Connection Status with TCPClient

  • Thread starter Thread starter Patrick
  • Start date Start date
P

Patrick

Hi...

I've written a small client, that uses the TCPClient for connecting to a
server and receives data from the server. When the connection is idle, after
5 minutes I get disconnected from the server. When this happens, I want to
reconnect to the server, but my problem is, I don't know how to find out if
I'm still connected or not.

Any ideas how to get that status?

Thanks
Patrick
 
You need to subclass TcpClient class, and then call Socket.Connected
property to get the info.
 
Back
Top