I am working on this program that utilizes sockets.
So far, I have created all I need but I am running into this problem when performing the following steps:
I have a client and a host, and the client has to remain connected to the host.
The user can change the client's IP address so the client needs to inform the host about it's new IP.
So far, I have been able to send in the new IP to the client... but the problem I am seeing is the client freezes for roughly 10 minutes before it establishes a new connection.
1. Connection established (client 10.1.4.2, host 10.1.4.3)
2. Host IP is updated to 10.1.4.5
3. host prior to completing the IP change issues a packet/command to host with new IP.
4. Client acks the receipt of the new ip, and closes the connection (socket).
5. Client updates the socket information with the new IP
6. Client connects to host (and it seems to connect without any errors)
7. Client sends an initial handshake statement and it freezes for around 10 minutes
8. Then, it automatically receives the intial handshake ACK and from this point on, it works fine.
I can ping the host just fine....
Does anyone know why this happens?
Do I need to do any type of cleanup in addition to closing the socket and reinitializing it?
Thanks in advance.