port.
Perhaps you got confused by the quintuple that defines a TCP session.
Post by ***@gmail.com [hercules-390]Hi,
Well maybe I'm wildly mistaken here (and please ignore the message if
so), but from reading these past responses it appears to me that some of
the respondents have things slightly mixed up, and are confusing one
1.)
The OP was referencing the fixed listen ports that
programs/daemons/services on the 'server' side listen on for incoming
connections. If you want a program to listen on a specific port for
incoming connections, it needs to be free and available and not in use
for listening by another program already.
2.)
Some of the responders are talking about the random/dynamic/ephemeral
ports that are created on the 'client' side for outgoing connections.
These get assigned randomly as needed from the entire available port
range, so if port 3505 is already in use for outgoing connections then
another free port from the entire range gets selected.
While these are connected, they are not the same : If I understand
things correctly one can have both a program/daemon/service like
Hercules listening on port 3505 for incoming connections, and have still
use port 3505 for outgoing connections. They are two different pools.
The original problem to me seems to be that another program is already
listening on fixed port 3505 for incoming connections, so that Hercules
(card reader) cannot use it anymore, and not that the OP has run out of
the entire free range of ports for outgoing client connections. A quick
Google on 'program port 3505' gets some hits for 'trojans/malware' that
by default listen on this socket. If this is indeed the case, the
solution would be to use an anti-virus program to remove the trojan that
is keeping the socket in use, which would once more free it up for use
by Hercules.
- Maarten