CSocket: in which cases that server receives OnClose() event?
-
As I tested, in the 3 cases, server receives OnClose() event: 1. client calls Close() 2. client exits app - Close() should be called in client destructor. 3. server send string to client after Close() was called by client. Are there other cases that server receives OnClose() event? E.g. (from google) if internet unplugged on client side, server doen't receive OnCloe() - I use local IP address, so I can't test the case. .
-
As I tested, in the 3 cases, server receives OnClose() event: 1. client calls Close() 2. client exits app - Close() should be called in client destructor. 3. server send string to client after Close() was called by client. Are there other cases that server receives OnClose() event? E.g. (from google) if internet unplugged on client side, server doen't receive OnCloe() - I use local IP address, so I can't test the case. .
Basically OnClose() event is recieved to notify that the connected socket is closed by its process. It can happen due to following: - 1) Network subsystem failed 2) Connection was reset by the remote side 3) Connection was aborted due to timeout or other failure. Try to fit your test cases here... CHEERS!!!