I'm updating legacy code written in VB6 using Winsock controls. Essentially, I'm trying to connect 4 computers across a local network such that the computers can share files between each other when needed. Originally, once a connection was established, they held onto them indefinitely. These would error after 12-24 hours, however, and couldn't be reestablished.
To make matters worse, the entire network is wrapped in tight security, and we only have a set number of ports to work with (their firewall blocks all other ports.) I suspect the network security is responsible for closing connections that have been inactive for too long, and are the cause of our instability (our tests here ran indefinitely and reestablished themselves if we rebooted any of the computers.)
My thought is to only establish connections on demand, when a file needs to be sent, to avoid this possibility. The problem I run into is that you cannot connect through the same port for four minutes. So no more than one file can be sent in a four minute window (unless you have all the files at once, but they're generated at different times.) Using three ports allow three files to be sent at once (one to each peer) but then I'm locked down for four more minutes. I could keep adding ports, but this seems inelegant at best, and will not be allowed by their IT department, at worst.
Any ideas? I can't find any other socket controls for VB6 that allow reusable bound ports.