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. Web Development
  3. ASP.NET
  4. How to Find Client Network cable is unplugged or plugged in

How to Find Client Network cable is unplugged or plugged in

Scheduled Pinned Locked Moved ASP.NET
helpsysadmintutorial
4 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.
  • S Offline
    S Offline
    sindhutiwari
    wrote on last edited by
    #1

    hi in my application i am sending message to a client using socket(TCP IP) now if the clients network cable is unplugged ...still the messages which i am sending are going without any error .....now this is creating a problem so if any one knows how to know the clients network cable is plugged in or not please do let me know ......as i am strucked at this point regards sindhu tiwari

    its me sid

    E 1 Reply Last reply
    0
    • S sindhutiwari

      hi in my application i am sending message to a client using socket(TCP IP) now if the clients network cable is unplugged ...still the messages which i am sending are going without any error .....now this is creating a problem so if any one knows how to know the clients network cable is plugged in or not please do let me know ......as i am strucked at this point regards sindhu tiwari

      its me sid

      E Offline
      E Offline
      Eytukan
      wrote on last edited by
      #2

      Hehehe - grins TCP. Yup TCP doesn't have a mechanism to detect it automatically..and it's because any network would have frequent "negligible" disturbances that TCP would not take it as a "disconnect". The only way I knew was to keep a routine to check clients PULSEs . Server->"Are you there?" Client0->"Yup".:cool: Client1->"Yup".:cool: Client2->...:suss:. clientList[2].remove(); :-\


      OK,. what country just started work for the day ? The ASP.NET forum is flooded with retarded questions. -Christian Graus Best wishes to Rexx[^]

      S 1 Reply Last reply
      0
      • E Eytukan

        Hehehe - grins TCP. Yup TCP doesn't have a mechanism to detect it automatically..and it's because any network would have frequent "negligible" disturbances that TCP would not take it as a "disconnect". The only way I knew was to keep a routine to check clients PULSEs . Server->"Are you there?" Client0->"Yup".:cool: Client1->"Yup".:cool: Client2->...:suss:. clientList[2].remove(); :-\


        OK,. what country just started work for the day ? The ASP.NET forum is flooded with retarded questions. -Christian Graus Best wishes to Rexx[^]

        S Offline
        S Offline
        sindhutiwari
        wrote on last edited by
        #3

        the question which i have asked is indirectly abt the pinging in this scenario i can do one thing send some bytes to client and in reply to that recive some bytes from client ............ but what i really wanna do is that once a message is send from the server it must be in a state to know weather the client system is in the network or not ......... dude if u have any idea abt this then let me know Sid

        its me sid

        E 1 Reply Last reply
        0
        • S sindhutiwari

          the question which i have asked is indirectly abt the pinging in this scenario i can do one thing send some bytes to client and in reply to that recive some bytes from client ............ but what i really wanna do is that once a message is send from the server it must be in a state to know weather the client system is in the network or not ......... dude if u have any idea abt this then let me know Sid

          its me sid

          E Offline
          E Offline
          Eytukan
          wrote on last edited by
          #4

          Yes, that's possible. Check for IPPROTO_ICMP. But I would only suggest a mechanism where the client *replies* to our pulse-ping. Because imagine a case, the network is out and in few seconds it's up again. Now you send your ICMP query this would say that the client is still up. But it's a reincarnated client, it doesn't hold up the old connection. So your client list would go meaningless. So make a seperate thread that keeps pinging for clients pulses and mainting the clients.


          OK,. what country just started work for the day ? The ASP.NET forum is flooded with retarded questions. -Christian Graus Best wishes to Rexx[^]

          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