|
-
Oct 14th, 2009, 04:01 PM
#1
Thread Starter
Addicted Member
Proper Client/Server Disconnect procedure
Ok new quesion.
What is the proper accepted way a Client disconnects from a server?
Does the client send a disconnect request. The Server reply then do say
TcpClient.GetStream.Close () etc
or am I making to much work for myself?
-
Oct 14th, 2009, 05:27 PM
#2
Re: Proper Client/Server Disconnect procedure
Depends how sure you need to be that a client has disconnected in a graceful way. I would normally just do TcpClient.Close and that is it but if you need to know when a client disconnects then yeah implement some kind of 'goodbye' routine that alerts the server. Although I dont quite see why the server would need to reply before the client can disconnect because if the client sends this goodbye signal and the server does not respond then there is not a lot more the client can do anyway, it should probably just assume that the server has either disconnected its session or is down, so it may as well carry on with whatever it would do even if the server had acknowledged the goodbye command.
Last edited by chris128; Oct 15th, 2009 at 09:30 AM.
-
Oct 15th, 2009, 09:26 AM
#3
Thread Starter
Addicted Member
Re: Proper Client/Server Disconnect procedure
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|