-
June 27th, 2009, 10:08 AM
#1
[RESOLVED] Socket State (connected or not)
how can i check that current state of a socket? if its connected or not
i have multiple clients on a server and i want to check if client X is still connected or not
-
June 28th, 2009, 09:02 PM
#2
Re: Socket State (connected or not)
Originally Posted by Cpp_Noob
how can i check that current state of a socket? if its connected or not
i have multiple clients on a server and i want to check if client X is still connected or not
If you use your own protocol for the client-server application, then you can add in a functionality in both client and server side to perform "ping" when the client is idle.
For example: TELNET protocol has Are You There (AYT) command.
http://support.microsoft.com/kb/231866
Xander Tan
-
June 28th, 2009, 09:21 PM
#3
Re: Socket State (connected or not)
As explained by xander_tan, create some communication protocol to test your client server protocol.
thia is the only way....
-
June 29th, 2009, 07:19 AM
#4
Re: Socket State (connected or not)
thanks for the help
-
June 30th, 2009, 03:27 PM
#5
Re: [RESOLVED] Socket State (connected or not)
recv() function returns 0 when the connection was closed.
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
|