mirror of
https://github.com/genxium/DelayNoMore
synced 2025-10-09 00:26:39 +00:00
Fixed part of Cpp to Js callback scopes.
This commit is contained in:
@@ -26,6 +26,14 @@ func main() {
|
||||
}
|
||||
|
||||
data := strings.TrimSpace(string(message[:rlen]))
|
||||
fmt.Printf("received: %s from %s\n", data, remote)
|
||||
fmt.Printf("received: %d bytes, content=%s from %s\n", rlen, data, remote)
|
||||
|
||||
// echo
|
||||
rlen, wrerr := conn.WriteTo(message[0:rlen], remote)
|
||||
if wrerr != nil {
|
||||
fmt.Printf("net.WriteTo() error: %s\n", wrerr)
|
||||
} else {
|
||||
fmt.Printf("Wrote %d bytes to socket\n", rlen)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user