Page 1 of 1

Server closed connection, how to check

Posted: Thu Aug 07, 2003 11:26 pm
by Johan_Haegg
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()

Posted: Fri Aug 08, 2003 8:32 am
by Marcel
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

Posted: Fri Aug 08, 2003 8:57 am
by Tranquil
Or take a look here:

http://msdn.microsoft.com/library/defau ... odes_2.asp


eg: WSAECONNABORTED, WSAENOTCONN, WSAESHUTDOWN

Cheers
Mike

Posted: Fri Aug 08, 2003 9:32 am
by Johan_Haegg
Well, since its a Proxy i am writeing on there wont be any way to check with ping-pong command.

Thanks Tranquil, forgot about MSDN