TcpListener: How do you know when TcpClients disconnet?

  • Thread starter Thread starter Hans Olav Stjernholm
  • Start date Start date
H

Hans Olav Stjernholm

Hi!

I'm using the TcpListener to allow incoming tcp connections. But I haven't
found any way to figure out whether (or when) a remote TcpClient (gotten
from AcceptTcpClient) disconnects.

Any clues?

'Hans Olav.
 
I don't use TCPClient, but Socket has a Socket.Connected property that
indicates whether a socket is connected or not. It would just as easy to
use AcceptSocket method to accept the connection to a Socket object.

Dmitry
 
Back
Top