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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top