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#
  4. how to check if client still connected to server

how to check if client still connected to server

Scheduled Pinned Locked Moved C#
sysadminhelpcsharptutorialquestion
3 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.
  • B Offline
    B Offline
    batmanAgen
    wrote on last edited by
    #1

    hi, i have a c# network based system, in which multiple clients connect to a central server. there is a server application and there are many client applications installed in each of the network workstations. what i want to do if i disconnect the LAN cable, from the workstation, my server will know it and will prompt the admin for that. how will do that?? help pls.. tnx.. i have no problem if the client closes the clientApplication, the server workstation list would immediately be updated. but if i disconnect the cable the list is not updated.

    P 1 Reply Last reply
    0
    • B batmanAgen

      hi, i have a c# network based system, in which multiple clients connect to a central server. there is a server application and there are many client applications installed in each of the network workstations. what i want to do if i disconnect the LAN cable, from the workstation, my server will know it and will prompt the admin for that. how will do that?? help pls.. tnx.. i have no problem if the client closes the clientApplication, the server workstation list would immediately be updated. but if i disconnect the cable the list is not updated.

      P Offline
      P Offline
      Praveen Nayak
      wrote on last edited by
      #2

      Usually in client-server architecture, the initative must be taken by the client to contact the server. The server does not go searching for the client. A problem similar to yours is also faced by Web Servers like IIS, which maintain a session per client that connects and session takes up memory on the server. So the session must be destroyed when the client disconnects. But web browsers like IE do not inform the server on being closed. So server comes up with a simple mechanism of destroying the session. If the client does not connect for a long time (maybe 15 minutes), the session gets automatically destroyed. You can adopt a similar concept. Also, a live client could send some dummy ping messages at regular intervals, to keep the session active. There has to be more to life than just this

      B 1 Reply Last reply
      0
      • P Praveen Nayak

        Usually in client-server architecture, the initative must be taken by the client to contact the server. The server does not go searching for the client. A problem similar to yours is also faced by Web Servers like IIS, which maintain a session per client that connects and session takes up memory on the server. So the session must be destroyed when the client disconnects. But web browsers like IE do not inform the server on being closed. So server comes up with a simple mechanism of destroying the session. If the client does not connect for a long time (maybe 15 minutes), the session gets automatically destroyed. You can adopt a similar concept. Also, a live client could send some dummy ping messages at regular intervals, to keep the session active. There has to be more to life than just this

        B Offline
        B Offline
        batmanAgen
        wrote on last edited by
        #3

        Thanks for the response...:) i think ill adopt that method in my client/server application...Thanks again!:D

        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