|
|
|
date: Wed, 24 May 2006 15:08:36 -0400,
group: microsoft.public.windowsnt.terminalserver.misc
back
Re: Detecting a lost connection
Could you not use the Winsock API, if you know what port the connections are
on, enumerate them? This will tell you when the clients are disconnected by
the state of the sockets.
You could see this by using the NetStat -n at the command prompt.
Of course if it's multiple terminal servers using clustering or someother
technology it will not do the job.
Regards,
Mike.
"David Ehrlich" wrote in message
news:uNHBnV2fGHA.2172@TK2MSFTNGP04.phx.gbl...
> I'm working on an application that is running on a Windows 2003 Terminal
> Server. It needs to detect that the client has lost the connection and
> take an appropriate action. I've set up a thread that periodically calls
> WTSQuerySessionInformation(WTS_CURRENT_SERVER_HANDLE, WTS_CURRENT_SESSION,
> WTSConnectState, ...). This works, but not in a timely manner. In tests,
> it typically takes upwards of 45 seconds for function to return
> WTSDisconnected.
>
> How can an application detect that the client has become disconnected in a
> timely manner?
>
> Thanks,
> --David
>
>
date: Wed, 31 May 2006 13:30:49 +0100
author: Mike
|
|