How to get unplug the Ethernet cable message in WSAAsyncSelect ?
-
when I unplug the Ethernet cable,the client doesn't send the FD_CLOSE event to the server so the server's online list isn't fresh new. How about this ?
-
when I unplug the Ethernet cable,the client doesn't send the FD_CLOSE event to the server so the server's online list isn't fresh new. How about this ?
-
Koma Wang wrote:
when I unplug the Ethernet cable,the client doesn't send
If the cable is unplugged there is no physical path to send on.
The best things in life are not things.
First , thanks for your reply ! but how can I get it offline real-time ? I set a timer to call CheckIsOnline() to find the client struct's m_nLastActive; the client call SendHeartPacket() every 30 second, and the server recv it then set the m_nLastActive. when (GetTickCount() - m_nLastActive) >= (1000 * 10),I will remove from the list. but when I run some days in wlan server, it be crashed,I cound't found what's wrong with it. :( This is my biggest headache !
-
First , thanks for your reply ! but how can I get it offline real-time ? I set a timer to call CheckIsOnline() to find the client struct's m_nLastActive; the client call SendHeartPacket() every 30 second, and the server recv it then set the m_nLastActive. when (GetTickCount() - m_nLastActive) >= (1000 * 10),I will remove from the list. but when I run some days in wlan server, it be crashed,I cound't found what's wrong with it. :( This is my biggest headache !
Koma Wang wrote:
some days in wlan server, it be crashed,I cound't found what's wrong with it.
Sorry, but that does not give us any clues as to what might be happening. If your system is crashing then you should add some trace or debug code to your program and try to trace the conditions that cause the crash.
The best things in life are not things.
-
Koma Wang wrote:
some days in wlan server, it be crashed,I cound't found what's wrong with it.
Sorry, but that does not give us any clues as to what might be happening. If your system is crashing then you should add some trace or debug code to your program and try to trace the conditions that cause the crash.
The best things in life are not things.
thanks ! :)