µTasker Forum
µTasker Forum => µTasker general => Topic started by: Forrest on January 29, 2009, 02:59:06 PM
-
Hi Mark,
I wrote simple TCP clients. So I have 4 connections whitch all the time sending reguests to server and reading data. I need change ip adress (server).
Must I close TCP connection, release socket and again get socket and connect (with other IP) to different server? Or is any simplest way to change IP?
Thanks Forrest
-
Hi Forrest
A TCP connection is unique and has the parameters (IP address of client - port address of client - IP address of server - port address of server).
This means that it is necessary to first close any existing connection, then establish a new connection to the new IP / port combination.
If you are working as a client you don't need to release the socket, just close the connection and reconnect to the new IP address.
Regards
Mark