I'm not sure I understand...
To send a FIN to the remote site, you have to call Shutdown, not Close. When 
the remote acknoledge
the end of connection, you get the OnSessionClosed event triggered.

--
Contribute to the SSL Effort. Visit
http://www.overbyte.be/eng/ssl.html
--
[EMAIL PROTECTED]
Author of ICS (Internet Component Suite, freeware)
Author of MidWare (Multi-tier framework, freeware)
http://www.overbyte.be



----- Original Message ----- 
From: "Jeff Peng" <[EMAIL PROTECTED]>
To: <twsocket@elists.org>
Sent: Thursday, February 09, 2006 11:44 AM
Subject: [twsocket] about the socket close


> hello,list,
>
> I have a pair of Client-Server Socket programs.When the client have finished
> writing the datas,it should call the 'close()' to close the socket-end for
> client.And,when the server receive the EOF coming from client,it should call
> the 'close()' the close socket-end for server.Then the established socket
> between client and server should be freed.
>
> As we know,the close behavier under tcp socket is shown as below:
>
>  *      Client   --->  FIN  --->  Server*
>
> *       Client   <---  ACK  <---  Server*
>
> *       Client   <---  FIN  <---  Server*
>
>        *Server   --->  ACK  --->  Client*
>
> **
>
> *The question I want to know is,when the 'close()' call happened,if it
> should generate a 'FIN' and send it to another end?If it's true,then at the
> server end,when it receive the 'EOF' coming from client,it can delay for
> some time to call 'close()',so the 'FIN' should not be sent to client
> immediately,is it?*
>
> *Thanks for replies.*
>
> **
>
> **
>
> *Jeff*
> -- 
> To unsubscribe or change your settings for TWSocket mailing list
> please goto http://www.elists.org/mailman/listinfo/twsocket
> Visit our website at http://www.overbyte.be

-- 
To unsubscribe or change your settings for TWSocket mailing list
please goto http://www.elists.org/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be

Reply via email to