Jump to content
The simFlight Network Forums

Knowing when FS has been lost


Recommended Posts

Hi,

I am using MS fs2004 and reading data from it with fsuipc over wideserver.

My application needs to trigger an even when the FS has gone down or been closed for whatever reason, and i cant find any information about how to do this.

fsuipc just seems to carry on normally :?

Thanks,

Martyn.

Link to comment
Share on other sites

My application needs to trigger an even when the FS has gone down or been closed for whatever reason, and i cant find any information about how to do this.

fsuipc just seems to carry on normally :?

Well, FSUIPC and WideServer close when FS closes, they have no choice. They most certainly don't carry on normally. WideClient provides data from its memory, as it always does. When WideServer packs up, that memory will no longer be updated.

At present the only way to determine if FS is 'alive' and you are still 'connected' is to check one of the various "active" counters -- 337E probably being the most suitable. There's also the timer in 3374. If they don't change over a reasonable time (maybe allow a few seconds in case of severe Network hiccoughs or local problems), then assume FS has gone down or the link has been severed.

Note that those values may also stall if the connection from Wideclient to WideServer is blocked or lost. You cannot differentiate this from FS closing or crashing.

As far as FS closing is concerned, by the time FSUIPC knows FS is closing it only has time to tidy up, releasing resources. WideServer similarly. I don't know if it would be able to send out messages to the WideClients saying it was closing -- I could certainly investigate that if it is important. But nothing will cope with FS crashing, obviously.

Regards,

Pete

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use. Guidelines Privacy Policy We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.