philazzi44 / DnDCS

DnD Client-Server
3 stars 1 forks source link

Client should poll the server to see when it disconnects #28

Open philazzi44 opened 10 years ago

philazzi44 commented 10 years ago

EndTask on the server will cause the client to sit idle, not recognizing that the socket is closed. Normally, the server closes gracefully and sends an Exit message to the client.

What we can do is set up a Client to Server ping (or poll to check the socket itself, if it can tell us if it's open). If it is open, do nothing. If it's not open, we can prompt to reconnect (invoke the Reconnect Menu Option). If the Server is, in fact, gone, that reconnection will cause the client to quit.