I am listening on specific port for incoming connection requests. Because this port is known I am able to modify the "port forwarding" on the router to send requests to the correct computer.

However, when the ACCEPT method is called for the WinSock control it randomly picks a port. How do I specify the port I want to use for the ACCEPT method?

If I can manually select the port then I am able to open a specific block of ports on the router.

Any help would be appreciated.

Thanks.