2 questions. I plan on using IO::Socket::INET for this script.
1. Heres the situation:
There is a server across the way. This server has two ports allocated, A and B. A is port 12345 and its job is to send the telemetry of an aircraft. B is on port 6789 and its job is to send the waypoint locations. I would like to write a script that will connect to BOTH of these ports in one swoop. Since A and B both have the same host address I was hoping this would be possible. The two possibilities I know of are: fork which I have not done before and threads.
2. I would like to make the script as autonomous as possible. That means that when the socket disconnects it would be great if it sleeps for a little while then tries to reconnect to the host. I'm not sure how to go about this and would like a little help (or a reference).