how to check if client still connected to server
-
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.
-
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.
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
-
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
Thanks for the response...:) i think ill adopt that method in my client/server application...Thanks again!:D