Quantcast
Channel: VBForums - Visual Basic 6 and Earlier
Viewing all articles
Browse latest Browse all 21159

Using Winsock Listen Mode talking to a device that uses port forwarding

$
0
0
Hi All

Im writing some code to listen to an analytical device which uses a cellular modem with a port forwding table.

I can connect to the device..

Winsock1.Protocol = sckTCPProtocol
Winsock1.LocalPort = 8060
Winsock1.Listen

The connection request returns the remote host ip and remote port number, the issue is the remote port number needs to match the port forwarding table of my modem. I cant figure out how to tell winsock to use a dedicated remote port number.

Ive looked at bind, but cant see how this would work, I tried specifying the remote port number before running listen but that still picked a random port number.

any ideas

thanks

thomas

Viewing all articles
Browse latest Browse all 21159

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>