net: conn.WriteToUDP([]byte("not ok"), addr)

93 views
Skip to first unread message

Gert

unread,
Oct 9, 2019, 9:24:17 PM10/9/19
to golang-nuts
Hi, I am trying to figure out why what's going on?

conn.Write([]byte("ok"))

https://play.golang.org/p/8Fq1XyYTFs1

vs

conn.WriteToUDP([]byte("not ok"), addr)

I assumed it was unintended behavior and opened a issue at


Gert

unread,
Oct 9, 2019, 10:12:40 PM10/9/19
to golang-nuts
thx Andrey Mirtchovski

err was `write udp 127.0.0.1:59864->127.0.0.1:5127: use of WriteTo with pre-connected connection`

Reply all
Reply to author
Forward
0 new messages