Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. How to get unplug the Ethernet cable message in WSAAsyncSelect ?

How to get unplug the Ethernet cable message in WSAAsyncSelect ?

Scheduled Pinned Locked Moved C / C++ / MFC
sysadmintutorialquestion
5 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • W Offline
    W Offline
    wangningyu
    wrote on last edited by
    #1

    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 ?

    L 1 Reply Last reply
    0
    • W wangningyu

      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 ?

      L Offline
      L Offline
      Lost User
      wrote on last edited by
      #2

      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.

      W 1 Reply Last reply
      0
      • L Lost User

        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.

        W Offline
        W Offline
        wangningyu
        wrote on last edited by
        #3

        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 !

        L 1 Reply Last reply
        0
        • W wangningyu

          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 !

          L Offline
          L Offline
          Lost User
          wrote on last edited by
          #4

          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.

          W 1 Reply Last reply
          0
          • L Lost User

            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.

            W Offline
            W Offline
            wangningyu
            wrote on last edited by
            #5

            thanks ! :)

            1 Reply Last reply
            0
            Reply
            • Reply as topic
            Log in to reply
            • Oldest to Newest
            • Newest to Oldest
            • Most Votes


            • Login

            • Don't have an account? Register

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • World
            • Users
            • Groups