Server closed connection, how to check
-
- User
- Posts: 60
- Joined: Wed Apr 30, 2003 2:25 pm
- Location: Västerås
- Contact:
Server closed connection, how to check
When using NetworkServerEvent(), its possible to see if the connection has been closed, but is there some way to check if a Client connection has been closed, found nothing in NetworkClientEvent()
You must ping the server.
If he doesnt anserwer, it has disconect.
Example:
client send "ping" to the server
the server send "pong" to the client
->the client is conect with the server
client send "ping" to the server
the server dont anser after 2 sek
->the client isnt conect with the server.
Thats the system of some irc-clients
Sorry for my bad english...i hope you have understand
If he doesnt anserwer, it has disconect.
Example:
client send "ping" to the server
the server send "pong" to the client
->the client is conect with the server
client send "ping" to the server
the server dont anser after 2 sek
->the client isnt conect with the server.
Thats the system of some irc-clients
Sorry for my bad english...i hope you have understand
Or take a look here:
http://msdn.microsoft.com/library/defau ... odes_2.asp
eg: WSAECONNABORTED, WSAENOTCONN, WSAESHUTDOWN
Cheers
Mike
http://msdn.microsoft.com/library/defau ... odes_2.asp
eg: WSAECONNABORTED, WSAENOTCONN, WSAESHUTDOWN
Cheers
Mike
Tranquil
-
- User
- Posts: 60
- Joined: Wed Apr 30, 2003 2:25 pm
- Location: Västerås
- Contact: