On Fri, Oct 02, 2009 at 03:48:02PM -0700, Adam Langley wrote:
> On Fri, Oct 2, 2009 at 3:44 PM, Jacob Mandelson <[email protected]> wrote:
> > The Linux send(2) man page explicitly says the message is all-or-nothing,
> 
> I don't think so. It says:
> 
> "If  the message is too long to pass atomically through the underlying
> protocol, the error EMSGSIZE is returned, and the message is not
> transmitted."
> 
> I think the confusion is that the "underlying protocol" for
> SOCK_STREAM isn't atomic. The description of the error is clearer:
> 
> "EMSGSIZE: The socket type requires that message be sent atomically,
> and the size of the message to be sent made this impossible."

It also says:         
       When  the  message  does  not  fit  into the send buffer of the socket,
       send() normally blocks, unless the socket has been placed in non-block‐
       ing  I/O  mode.   In  non-blocking  mode it would return EAGAIN in this
       case.

Which reads like "all or nothing" to me, though I could imagine a (perverse?)
implementation with each writer having a send buffer lower layer pulling 
data from multiple writers' send buffers in an interleaved manner.  (But 
maybe there's something else which restricts sockets to a single send buffer.)

             -- Jacob

--~--~---------~--~----~------------~-------~--~----~
Chromium Developers mailing list: [email protected] 
View archives, change email options, or unsubscribe: 
    http://groups.google.com/group/chromium-dev
-~----------~----~----~----~------~----~------~--~---

Reply via email to