JLIST wrote: > Hello Francois and Arno for the replies. > > I read online that on Unix, close() reduce a ref count for > a socket. The last close() will call shutdown() automatically. > I'm not sure if the same is true on Windows but I would think > so because it makes sense and the whole TCP/IP thing starts on > Unix platforms.
Even though TWSocket.Close also calls ShutDown(1) it actually does not perform a bidirectional gracefull shutdown, since the socket handle may be closed too early. In order to initiate a gracefull shutdown after the last byte has been sent call shutdown(1) from event OnDataSent. For example, SendStr('bye bye') followed by a call to close() does not ensure the string is received at the peer. -- Arno Garrels -- To unsubscribe or change your settings for TWSocket mailing list please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket Visit our website at http://www.overbyte.be