When I use a TCP port as the source port on an outgoing connection, i.e. a connection I initiated, I can still listen for a (different) incoming connection on the same port. Things absolutely are supposed to work like this.
But why does getresources() have that port in the "used" dictionary if I only use it as outgoing (but not listening) port? What can I learn about network ports from the "used" dict that I can't from try:/except:ing my way through the list of ports that are assigned to my vessel?
When I use a TCP port as the source port on an outgoing connection, i.e. a connection I initiated, I can still listen for a (different) incoming connection on the same port. Things absolutely are supposed to work like this.
But why does
getresources()
have that port in the "used" dictionary if I only use it as outgoing (but not listening) port? What can I learn about network ports from the "used" dict that I can't fromtry:
/except:
ing my way through the list of ports that are assigned to my vessel?