Server closed connection, how to check

Just starting out? Need help? Post your questions and find answers here.
Johan_Haegg
User
User
Posts: 60
Joined: Wed Apr 30, 2003 2:25 pm
Location: Västerås
Contact:

Server closed connection, how to check

Post 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()
Marcel
New User
New User
Posts: 6
Joined: Wed May 21, 2003 6:27 am

Post 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
Tranquil
Addict
Addict
Posts: 952
Joined: Mon Apr 28, 2003 2:22 pm
Location: Europe

Post by Tranquil »

Or take a look here:

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


eg: WSAECONNABORTED, WSAENOTCONN, WSAESHUTDOWN

Cheers
Mike
Tranquil
Johan_Haegg
User
User
Posts: 60
Joined: Wed Apr 30, 2003 2:25 pm
Location: Västerås
Contact:

Post 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
Post Reply