NetTalk Central

Author Topic: How to detect network disconnect and shut down  (Read 18394 times)

pdc95

  • Newbie
  • *
  • Posts: 11
    • View Profile
    • Email
How to detect network disconnect and shut down
« on: April 03, 2009, 05:33:56 AM »
Hi
I am running a C5.5 app on multi PC's using netrefresh to redisplay changed data.
Each remote machine on the LAN is loading the app from the main machine over the network.
I need to detect if a remote machine is disconnected from the main machine via broken LAN link and shut the app down on that remote machine
I can detect the network break by pinging the main machine on a timed basis but I am unable to shut the app down on the remote machine in a consistant way.

How should I do this.

Regards
Pete

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11250
    • View Profile
Re: How to detect network disconnect and shut down
« Reply #1 on: April 04, 2009, 07:02:30 AM »
Hi Pete,

If the remote machine has disconnected from the LAN, how are you um, planning to send it an instruction? Communicating over the, um, disconnected wire perhaps?

Cheers
Bruce

pdc95

  • Newbie
  • *
  • Posts: 11
    • View Profile
    • Email
Re: How to detect network disconnect and shut down
« Reply #2 on: April 05, 2009, 06:05:34 AM »
Hi Bruce
It is at the remote machine that I needs to detect the broken wire and shut don the app that is runing off the master machine which hangs when the lan is broken.

I need to prevent the last condition displayed before the lan was broken as in the situation that this system is being used it could prove dangerous.

I think I need a second app running in the background which can detect the brake via pinging the master which then restarts windows.

So how do I make an app force windows to shut down and or restart.

Regards
Pete


Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11250
    • View Profile
Re: How to detect network disconnect and shut down
« Reply #3 on: April 05, 2009, 10:24:59 AM »
Hi Pete,

Ok, so the program needs to know when it has lost the connection to the server.
this isn't really a nettalk thing since it's pretty much "pure clarion".

I'm not sure you want to restart windows - I don't think that'll help. Perhaps you just need to terminate the app? Restarting windows automatically would be a big pain if the user was working in another app at the time.

There are various approaches you can take to monitoring one app with another.
I recommend asking on the newsgroups for some suggestions.

cheers
Bruce