jjjabc's recent timeline updates
jjjabc

jjjabc

V2EX member #137212, joined on 2015-09-07 13:05:36 +08:00
jjjabc's recent replies
回复能用 Markdown ?
```
func handleClient(conn *net.UDPConn) {
var buf [512]byte
_, addr, err := conn.ReadFromUDP(buf[0:])
if err != nil {
return
}
go {
daytime := time.Now().String()
conn.WriteToUDP([]byte(daytime), addr)
}
}
```
main 里面不要用 go ,在 handleClient 里面用
func handleClient(conn *net.UDPConn) {
var buf [512]byte
_, addr, err := conn.ReadFromUDP(buf[0:])
if err != nil {
return
}
go {
daytime := time.Now().String()
conn.WriteToUDP([]byte(daytime), addr)
}
}
Oct 19, 2015
Replied to a topic by ericwang0717 推广 送 10 本 JavaScript 忍者秘籍略表心意!
试一下, V2EX 第一帖希望带来好运气
About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   2687 Online   Highest 6679   ·     Select Language
创意工作者们的社区
World is powered by solitude
VERSION: 3.9.8.5 · 12ms · UTC 11:02 · PVG 19:02 · LAX 04:02 · JFK 07:02
♥ Do have faith in what you're doing.