Maksim Kasimov wrote:
> Hi,
>> how to set source ip-address when do __socket.connect((host, port))
> on a machine that have a several ip-adresses?
>> many thanks for advice.
>> __socket = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
> __socket.connect((host, port))
>>
sock.connect ( ('11.22.33.44', 9999) )
i.e. just put the ip address as string parameter into the connect address tuple
(where you wrote: host)
--Irmen