How can I get rid of
TIME_WAIT
when using the port leaving the client side as fixed in TCP communication?
What I have tried:
I'm trying to modify the program at the request of the client company, but no matter what,
TIME_WAIT
keeps occurring.
The development environment is Windows 10, the language is C#, and the development tool is Visual Studio 2015.
The equipment program reports MES to the client's server.
At this time, I was asked to bind the Local Port of the Client.
client.m_Socket.SetSocketOption(SocketOptionLevel.Socket, SocketOptionName.ReuseAddress, true);
client.m_Socket.SetSocketOption(SocketOptionLevel.Socket, SocketOptionName.Linger, new LingerOption(true, 0));
I'll write a sample program for the test.
I applied both server-side and client-side codes above, but no matter how I change it,
TIME_WAIT
keeps occurring.
Please show me how.