Further to this, you can see that having two diametrically opposite claims (1. UDPConn.Read implements Conn.Read and Conn is a generic stream-oriented network connection cf 2. UDP is not stream oriented) might be somewhat confusing.
On Sun, 2019-05-12 at 20:00 -0700, Kurtis Rader wrote: > And the Conn documentation says: "Conn is a generic stream-oriented > network > connection." UDP sockets are not stream-oriented. As Robert has > already > pointed out the Read() method on such an object is a wrapper around > the > read() syscall. Which for a UDP socket is equivalent to recv() with > flags > set to zero. You can't use it to read multiple packets with a single > call. > Nor can you use it to read a packet incrementally. At least on UNIX > like > platforms the excess bytes will be discarded. > -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/golang-nuts/1557723269.21310.88.camel%40kortschak.io. For more options, visit https://groups.google.com/d/optout.