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.
Anyway to answer my original question, I made a test and found out that calling shutdown(0) locally will not trigger a SessionClosed on remote side. Calling shutdown(1) and shutdown(2) will. Sunday, August 10, 2008, 10:44:15 PM, you wrote: > Yes, Shutdown at one side will cause session close at the other side. > Actaully, Shutdown is the way to gracefully close a connection. Shutdown > send to the other part a close request. The other part respond with a close. > The the initiating part call close. This is really the proper way to > negociate session end. -- 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