0

This isn't my actual problem, it but can be easily described like this. When I have simple python code that listens a fixed TCP port:

sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
sock.bind(('', 10000))
print 'starting up on %s port %s' % sock.getsockname()

You'd expect it to listen to port 10 000, but this is what happens:

starting up on 0.0.0.0 port 21340

What I'm trying to actually do is to develop stuff that uses Oracle Tuxedo, but I think this is what causes everything to fail.

Is there any way to reserve ports or something similar? I would only need few of them, I think.

4

0 回答 0