I have windows form. In the constructor server thread starts
thServer = new Thread(ServerThread);
thServer.Start();
In the server thread there is TCP listener loop:
while (true) {
TcpClient client = server.AcceptTcpClient();
...
}
When I close main form, this thread continues to wait TCPClient’s requests. How can I stop this routine?
Thank you.
1 Answer