G
Guest
I have a Client (a TcpClient object) established connection with the Server(a TcpListener). I want that when the Server goes down, the TcpClient detects this disconnection and when the Server is back up, client is able to establish connection again with the server.
However when my server goes down, client socket goes in CLOSE_WAIT state
and when server comes back and tries to reconnect server socket goes into FIN_WAIT state... can I not use the same objects on both sides to reconnect?
I am using TcpClient.Close() to disconnect and have set it's LingerState option to false but why it infinitely goes into CLOSE_WAIT state?
However when my server goes down, client socket goes in CLOSE_WAIT state
and when server comes back and tries to reconnect server socket goes into FIN_WAIT state... can I not use the same objects on both sides to reconnect?
I am using TcpClient.Close() to disconnect and have set it's LingerState option to false but why it infinitely goes into CLOSE_WAIT state?