tcp client socket bind problem

castironpi at gmail.com castironpi at gmail.com
Wed Mar 12 20:06:52 CET 2008


On Mar 11, 2:19 am, Tim Roberts <t... at probo.com> wrote:
> castiro... at gmail.com wrote:
>
> >On Mar 10, 9:40 am, Marc Christiansen <use... at solar-empire.de> wrote:
> >> nata... at gmail.com wrote:
> >> > I have a linux box with multiple ip addresses. I want to make my
> >> > python client connect from one of the ip addresses. Here is my code,
> >> > no matter what valid information I put in the bind it always comes
> >> > from the default ip address on the server. Am I doing something wrong?
> >...
>
> >help string:
> >Bind the socket to a local address.  For IP sockets, the address is a
> >pair (host, port); the host must refer to the local host.
>
> >docs:
> >Bind the socket to address.
>
> >Wikipedia:
> >Before a socket may accept incoming connections, it must be bound.
>
> >PHP.net:
> >Binds the name given in address to the socket described by socket .
> >This has to be done before a connection is be established using
> >socket_connect() or socket_listen().
> >This function must be used on the socket before socket_connect().
>
> That's all true.  So what was your point?  How does this help the original
> poster?

Confidence-- a second opinion of what the docs say.  Then, something
of a criticism of the docs.



More information about the Python-list mailing list