Home > database >  Pb socket
Pb socket

Time:09-24

Pb socket problem now: when the client suddenly loses power, the server or the client connection status, implementation function: when the client suddenly loses power, have the server and the client is disconnected, how to implement?

CodePudding user response:

The timer on detection.

CodePudding user response:

The timer to detect what to write?

CodePudding user response:

Server time (such as 3 minutes) to establish a connection with it the client sends confirmation online socket, send after, when the client receives the confirmation of the socket, need immediate reply server "I online",
After server in the event of a confirmed the socket, after 10 seconds, received reply "I online" socket, disconnected automatically with no reply to the client (failed to reply, when it has broken wires)

CodePudding user response:

The above said time interval, you can be the appropriate point

CodePudding user response:

I am using the socket number of leaflets, no user to use, is I write the toggle button in the program

CodePudding user response:

You have to yourself with these interactions in the program
  • Related