D
Dirk Reske
Hello,
I have following thread, that reads data from a socket.
private void RecThread()
{
int Len = 0;
byte[] input = new byte[1024];
while((Len = socket.Receive(input)) > 0) //*1
{
...
}
}
If I simply close the socket, I get an exception at *1
And I wont Abort() the thread.
How can I close the connection in a "clean" way?
I have following thread, that reads data from a socket.
private void RecThread()
{
int Len = 0;
byte[] input = new byte[1024];
while((Len = socket.Receive(input)) > 0) //*1
{
...
}
}
If I simply close the socket, I get an exception at *1
And I wont Abort() the thread.
How can I close the connection in a "clean" way?