Answer the question
In order to leave comments, you need to log in
How to immediately completely close the socket at TcpClient, without a timeout and release the port in the system?
TcpClient server = new TcpClient();
server.Client.LingerState = new LingerOption(false, 0);
server.NoDelay = true;
....
server.Client.Shutdown(SocketShutdown.Both);
server.Close();
server = null;
Answer the question
In order to leave comments, you need to log in
on the port used by the tcp client
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question