Home > other >  But how to determine the client SOCKET SOCKET server connection is broken
But how to determine the client SOCKET SOCKET server connection is broken

Time:10-06

In the SOCKET client sends a request, and receive the response from the server, if the server fails or network drops, etc., the client how to detect, on the server or network for troubleshooting after recovery, the client to establish a connection, make its normal work,

CodePudding user response:

And the server to keep the heart, the timeout automatically disconnect reconnection,

CodePudding user response:

How to keep the heart, to elaborate on it?

CodePudding user response:

Define the data structure of a test package, by every two seconds to send a client to the server, the server response for testing kits,

CodePudding user response:

If it is streaming socket, and to detect timeliness requirements is not high, can be done with the keepalive socket directly attribute, otherwise can only be done in the form of heartbeat packets,

CodePudding user response:

3 floor, 4th floor, can give a specific order code?
  • Related