Multi-homed socket server?

Joshua Muskovitz josh at open.com
Wed Oct 25 17:07:28 EDT 2000


This is just a guess, so take it for what it is.

When you bind with INADDR_ANY, you are saying that you don't care which
address it binds to.  But I don't think this means "accept connections from
any network adapter".  I think it means "select an adapter somehow, bind to
it, and accept connections on it".  If your adapters change on the fly, you
would have to detect that and rebind on the fly.

At least that's my guess.

-- josh

"the maddman" <maddman at maddman.org> wrote in message
news:39F74980.C24DC677 at maddman.org...
>     I'm trying to write a multi-threaded Python server, and it's been
> surprisingly easy so far, but I want to bind the socket to any address,
> not just the address I get back from DNS.  I tried binding to
> 'INADDR_ANY' but that didn't work.  I have DSL with PPPoE, so one IP
> could change while the server is running, and I need it to work after
> that.  Any one got some good sample code that I could learn from?
>




-----= Posted via Newsfeeds.Com, Uncensored Usenet News =-----
http://www.newsfeeds.com - The #1 Newsgroup Service in the World!
-----==  Over 80,000 Newsgroups - 16 Different Servers! =-----



More information about the Python-list mailing list