M
Morten
How do I detect if a client socket is no longer connected to the listen tcp
socket ?
I have tried with (just an example):
---------------------
Socket tcpSocket;
while(tcpSocket.Connected)
{
if(tcpSocket.Available)
{
// Receive incomming buffer
}
Thread.Sleep(1000;
}
// Client socket is disconnected
---------------------
The problem is that tcpSocket.Connected never gets false, when the client
first is connected. Even though the client do a client.Close(), it still
sees that its connected.
Best regards
-Morten
socket ?
I have tried with (just an example):
---------------------
Socket tcpSocket;
while(tcpSocket.Connected)
{
if(tcpSocket.Available)
{
// Receive incomming buffer
}
Thread.Sleep(1000;
}
// Client socket is disconnected
---------------------
The problem is that tcpSocket.Connected never gets false, when the client
first is connected. Even though the client do a client.Close(), it still
sees that its connected.
Best regards
-Morten