开发者

Is there a way to detect an "almost" Remote Desktop disconnect (i.e., a brief period of high latency)?

I work for a trading company where our users interact with the primary trading application via a Remote Desktop connection to a server that's physically located within the exchange's facilities.

A feature of our software is that it disconnects and pulls all quotes automatically if something goes wrong with the network and the RD session becomes disconnected.

Detecting this is accomplished by overriding the WndProc method of the application's main form, where the message parameter is checked for:

Msg == WM_WTSSESSION_CHANGE

and:

WParam.ToInt32() == WTR_REMOTE_DISCONNECT

This seems to work great i开发者_如何学Pythonn normal cases of the remote desktop becoming completely disconnected.

However, it sometimes happens that the users experience a short period of apparent disconnection, where the RD session becomes unresponsive (i.e., clicking doesn't do anything) but apparently the message described above is not received/processed. Within a few moments -- usually ~10 seconds -- the user sees the message "Reconnecting to remote desktop..." (or something like that) and suddenly the RD session starts responding again.

Since the whole idea of this pull-quotes-on-remote-desktop-disconnect feature is to prevent the scenario where, basically, our application is trading without the user being able to see what's happening, it's very desirable for us to be able to detect when the RD session is in what I'll describe as this "almost disconnected" state.

Anybody know how we could detect this?


My only suggestion would be to constantly ping the exchange server, and if the ping latency gets too high, disconnect.

I don't think the exchange would appreciate this idea.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜