Calling close() on a non blocking socket from within an io watcher
schmorp at schmorp.de
Sat Aug 8 15:56:17 CEST 2009
On Sat, Aug 08, 2009 at 03:38:31PM +0200, Marc Lehmann <schmorp at schmorp.de> wrote:
> > http://www.gnu.org/s/libc/manual/html_node/Closing-a-Socket.html#Closing-a-Socket
> > 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_ http://www.deliantra.net
----==-- _ generation
---==---(_)__ __ ____ __ Marc Lehmann
--==---/ / _ \/ // /\ \/ / pcg at goof.com
More information about the libev