[EMAIL PROTECTED] wrote:
> Thanks Wilfried. Close() will do it.
> 
> What then does Shutdown(x) do?  I see that Close()
> calls it with an argument of 1 (SD_SEND), which
> according to a comment is for "graceful close".  Does
> it stop sending data?


Most likely Wilfried is faster again ;-)
Shutdown() initiates a bidirectional shutdown procedure of a
connection, the listening socket however has no connection,
so calling TWSocketServer.Close is fine.
Call Shutdown(1) on the client socket when all data has been
sent (OnDataSent), it disables subsequent sends on the socket,
however data still pending in winsock buffer will be sent 
nevertheless.

--
Arno Garrels [TeamICS]
http://www.overbyte.be/eng/overbyte/teamics.html
> 
> 
> 
>> ------- Original Message -------
>>> From    : Wilfried
> Mestdagh[mailto:[EMAIL PROTECTED]
>> Sent    : 9/28/2007 12:03:57 PM
>> To      : twsocket@elists.org
>> Cc      :
>> Subject : RE: Re: [twsocket] TWSocketThrdServer
> graceful shutdown
>> 
>  >Hello dz,
> 
> Just call Close method. server will stop listening.
> Note that calling
> Close will not stop current connections, it only
> stops listening.
> 
> ---
> Rgds, Wilfried [TeamICS]
>  http://www.overbyte.be/eng/overbyte/teamics.html
>  http://www.mestdagh.biz
> 
> Friday, September 28, 2007, 17:44, [EMAIL PROTECTED] wrote:
> 
>> Hello:
>>      I using TWSocketThrdServer in a server
>> application and was wondering if there is a
>> recommended method to call for a graceful shutdown --
>> one that will stop listening when all current
>> connections are completed.
> 
>>      Thanks,
>>      -dZ.
> 
> 
> --
> 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