There is no claim because that is not how Go interfaces work - if you implement 
it, you are it - that being said, I wouldn’t use Read() with UDPConn - I would 
use one of the packet/msg reader methods instead.

Read() is a pass through to fd.Read() so it will be implementation dependent, 
but posix should be that only a single packet is returned. Since UDP is packet 
oriented, anything else would be unusable, since the packet size forms the 
boundaries. see http://developerweb.net/viewtopic.php?id=2952

The buffer size controls the size of the OS kernel buffer assigned to the 
socket - nothing to do with streaming reads.

> On May 12, 2019, at 7:20 PM, Dan Kortschak <d...@kortschak.io> wrote:
> 
> bump?
> 
> On Thu, 2019-05-09 at 16:23 +0930, Dan Kortschak wrote:
>> The Conn and UDPConn Read methods look like io.Reader Read methods,
>> but
>> there is no explicit claim that Conn is an io.Reader. Are the Read
>> methods of these two types identical in behaviour to io.Reader?
>> Specifically, are the reads allowed to fill the buffer with arbitrary
>> numbers of bytes in 0 <= len(p) <= n?
>> 
>> Also, can UPDConn.Read fill the buffer with more than one packet if
>> the
>> buffer would accommodate that? (I am guessing yes, and that if this
>> is
>> important then the ReadFrom method should be used).
>> 
>> thanks
>> Dan
>> 
> 
> -- 
> 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/1557706800.21310.59.camel%40kortschak.io.
> For more options, visit https://groups.google.com/d/optout.

-- 
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/151E5C75-05D9-4448-8858-A3E340009983%40ix.netcom.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to