Simconnect and network connection

Discuss on the SimConnect SDK can be used by programmers to write add-on components for Prepar3D
Locked
JeeHell
Posts: 94
Joined: Sun Jan 15, 2012 11:04 pm

Simconnect and network connection

Post by JeeHell »

Hello,

The SDK has a remark in the SimConnect_Open function documentation regarding connection between local simconnect and P3D simconnect:
If a remote client successfully establishes a link with Prepar3D, but at some later time the network connection is lost, SimConnect functions will return the NTSTATUS error STATUS_REMOTE_DISCONNECT (0xC000013CL).
This does not seem to be consistent at all, I have been testing this with different calls and I could only get it sometimes with SimConnect_RequestResponseTimes but not in a reproducible way and definitely NOT with all functions.

My test setup is very easy: 2 PCs, one desktop with P3D V4 running, one laptop with my app connected to the Wifi router. I simply switch off the Wifi to conduct the tests.

SimConnect_RequestResponseTimes may actually be of use by itself, as a long response time will usually indicate an issue... (it blocks for more than 20s...). Is it actually thread safe to call SimConnect_RequestResponseTimes in a separate thread, with the same hSimconnect handle? Or do I need to open a new Simconnect handle in the watchdog thread? What is the overhead impact of multiplying simconnect links?

Regards
Jean Luc
JeeHell
Posts: 94
Joined: Sun Jan 15, 2012 11:04 pm

Re: Simconnect and network connection

Post by JeeHell »

Am I the only one with this kind of connection check issues?

JL
Locked