Re: [Synalist] who should Close socket first? client or server?
Pascal TCP/IP Library
Brought to you by:
geby
From: Markku U. <mar...@di...> - 2009-11-12 14:34:52
|
Dmitry Konnov wrote: > in Synapse TCP communication, > who should close socket first if client request completed > successfully, for example: > > Client requested a String, Server have sent the String. > Should server at this point to wait some successful notification from > client to close socket? That pretty much depends on the protocol, though usually it is of no consequence; when the request/response -part has been acted out, the participants are usually free to continue as they wish. Personally, I generally close the socket (on the server side) as soon as I've sent all the data I'm supposed to send (and it is not expected that the client would write anything more to me) ... and same on client; when I've read all I'm expecting, I close the socket. -- Markku Uttula |