hello,
I have a class (I call them MyConnection), which establishes a
connection using a TcpClient.
After this connection is established I get the Network stream from the
TcpClient and create a StreamReader and a Streamwriter "on" it!
Then I start a new Thread which reads from the Streamreader.
When I close the connection using TcpClient.Close();
And try to reuse the class by call the constructor again
myConnection = new MyConnection();
It doesn't work correctly?
How to close such a class correctly?
How to safely close the thread?
(excuse my english <- I'm from germany)
*** Sent via Developersdex http://www.developersdex.com ***