Outbound port on sockets

Diez B. Roggisch deets at nospam.web.de
Fri Sep 15 04:03:08 EDT 2006


Bryan Olson schrieb:
> Diez B. Roggisch wrote:
>> bmearns schrieb:
>>> Is it possible to specify which port to use as the outbound port on a
>>> connection? 
> [...]
>>> Specifically, I'm trying to write an FTP host, and I'm trying to
>>> implement the PORT command. 
>>
>> AFAIK you neither can't do that nor need it.
> 
> It's not the issue here, but to specify the outgoing port
> call bind(('', portnum)) before connect().

I wasn't aware of that. Cool.

Diez



More information about the Python-list mailing list