Sync
This commit is contained in:
2
main.go
2
main.go
@@ -16,7 +16,7 @@ func lstn(connection *net.UDPConn, alarm chan struct{}) {
|
||||
n, remoteAddr, err := 0, new(net.UDPAddr), error(nil)
|
||||
for err == nil {
|
||||
n, remoteAddr, err = connection.ReadFromUDP(buffer)
|
||||
fmt.Println("from", remoteAddr, "-", buffer[:n])
|
||||
fmt.Println("from", remoteAddr, "-", string(buffer[:n]))
|
||||
n, err = connection.WriteToUDP([]byte("OK"), remoteAddr)
|
||||
if err != nil {
|
||||
fmt.Println("WriteUDP Error (", err.Error(), ")")
|
||||
|
||||
Reference in New Issue
Block a user