Outbound port on sockets

bmearns bmearns at coe.neu.edu
Thu Sep 14 14:23:12 CEST 2006


Is it possible to specify which port to use as the outbound port on a
connection? I have the IP address and port number for the computer I'm
trying to connect to (not listening for), but it's expecting my
connection on a certain port.

Specifically, I'm trying to write an FTP host, and I'm trying to
implement the PORT command. From everything I've read, the client
supplies the IP address and port number for where I'm supposed to
connect to send it data (like a LISTing), and it's expecting me to
connect over port 20. If anyone is familiar with FTP and can tell me
whether this is true or not, whether I really need to go out on port
20, I'd appreciate it, as well.

Thanks.




More information about the Python-list mailing list