Calling close() on a non blocking socket from within an io watcher

Marc Lehmann schmorp at
Sat Aug 8 15:56:17 CEST 2009

On Sat, Aug 08, 2009 at 03:38:31PM +0200, Marc Lehmann <schmorp at> wrote:
> >
> > 
> > Specifically the bit that says "Stop trying to transmit data from this
> > socket. Discard any data waiting to be sent.".

And btw., this document is completely bogus - shutdown for writing will of
course not discard any data, at least not on a unix system (not on windows

what the manpage probably tries to say is that further send/write operations
will be disallowed, and data discarded.

shutting down for write will simply signal an EOF to the other side via
tcp, the connection itself will of course continue.

(shutting down both directions is not an operation that maps on tcp/ip,
and behaviour between implementations differs).

                The choice of a       Deliantra, the free code+content MORPG
      -----==-     _GNU_    
      ----==-- _       generation
      ---==---(_)__  __ ____  __      Marc Lehmann
      --==---/ / _ \/ // /\ \/ /      pcg at
      -=====/_/_//_/\_,_/ /_/\_\

More information about the libev mailing list