Home > Software engineering >  Server-side WINSOCKET control at the receiving client corresponding control issued after the CLOSE o
Server-side WINSOCKET control at the receiving client corresponding control issued after the CLOSE o

Time:09-22

Server-side WINSOCKET controls (such as called SckServer1) in the receiving client corresponding control issued after the CLOSE of the news, why server-side SckServer1 SckServer1_CLOSE event if not contain code: SckServer. CLOSE, repetitive execution SckServer1_CLOSE event will be repeated, would have been taken down,

Why is this?

CodePudding user response:

Set a global variable, prevent reentrant,

CodePudding user response:

reference 1st floor zhao4zhong1 response:
set a global variable, prevent reentrant,


Thank you very much, but I still want to ask, why are not performed in SckServer_CLOSE SckServer. CLOSE, SckServer_CLOSE will be repeated execution,
Is it because the client is not received at the moment the server-side SckServer CLOSE message, continue to send the server caused by "the client CLOSE" message,

CodePudding user response:


The Close event


When the remote computer closes the connection, the application should correct the Close method is used to Close the TCP connection,

Syntax

Object_Close ()

Object where represents an object expression, and its value is "applied" in the list of objects,

Parameter

None

CodePudding user response:

Pass by, I said, didn't meet this kind of circumstance!

CodePudding user response:

Use the control array?
  • Related