detect shutting down of client from the server

     I install my Internet time monitoring system application and it works fine, But the only disadvantage with my application is that when the user shut'sdown or restart the client pc even at  a normal procedure way, without informing the net attendant at the server, (not pushing the restart button or ON/OFF button) my application at the server can't detect that the workstation shuttingdown or restarting.
  
   how do i make it in VFP that when the clients shutdown the pc, my program  will give a signal to the server that the pc is shutting down or restarting ,

Is there anybody out there can help me regarding this matter ,..thank you very much in advance.




Answer this question

detect shutting down of client from the server

  • Encaps

    Is the client PC running any of your applications   If so, you could try creating a VFP free/contained table on the server.  As the client app starts up, it ensures that the table contains a record for it/its workstation, and RLOCK()s that record.  When the client app terminates, it, of course, releases the RLOCK() in program code. 

    However, the RLOCK() is also released by the operating system whenever the client machine is turned off some way that your client PC app terminates normally.  Your server can periodically loop thru the records in that table, and those for which it can get an RLOCK() (and immediately unlock) are client machines that are not currently running.

    If the client PC is NOT running any of your applications, then I have no idea how the server can tell when client machines start/shutdown.

    Drew Speedie
    VFP MVP

  • Klingon

    Yes, i have an application running at the client that will inform the user regarding his/her time usage, chat (vise-versa), and warn the user if he/she already near the allocated time of his/her use, i put an option that will shutdown/restart automatically the client.

    But at the client side, if he/she shutdown the pc... that's it, no warning to the server that the client has already shutdown.

    by the way i am using the winsock for my connection.... thank you very much for your time & help about this matter.


  • detect shutting down of client from the server