WinBatch Tech Support Home

Database Search

If you can't find the information using the categories below, post a question over in our WinBatch Tech Support Forum.

TechHome

Winsock
plus
plus
plus
plus
plus
plus
plus
plus
plus
plus

Can't find the information you are looking for here? Then leave a message over on our WinBatch Tech Support Forum.

How Does Winsock Extender Use Ports??

Keywords:   ports freezing

Question:

I've noticed with the wxgetinfo command that the port changes after each connection ( I display the last connection IP and port).

I found that when I set SLISTEN to a particular port#, and the connect script uses SCONNECT to the same port# it also changes each time (???) usually by increments of +2 (ie start at 1490, and next time it shows port 1492, 94, 96 etc). It also may not even use the port I select, instead starting somewhere else and incrementing from there.

Is that why it freezes, eventually running out of ports? Or is it taking the next available port?

Is there a way to specify and use just one port?

Answer:

Nope.. That's how it works.

The port you connect to - or listen on - is like the "receptionist" port. When you connect to the sListen port, the receptionist does the real connect on a different set of ports and goes back looking for more connects.

If you don't do the SClose, then you can run out of ports. It should be able to re-use closed ports.

OR...

Once you get a connection, leave the connection open for pretty much forever.


Article ID:   W12607
Filename:   How Does Winsock Extender Use Ports.txt
File Created: 2017:07:28:12:58:52
Last Updated: 1999:04:15:15:48:22