I think Apache is doing something different. When I run this code
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
s2 = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
netstat shows two entries, whereas Apache is showing a single entry
for all IP adresses on the server.
ROOT@...: ~ # netstat -l
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address Foreign Address
tcp 0 0 *:www-http *:*
tcp 0 0 bryn.ruddhome.com:8082 *:*
tcp 0 0 localhost:8082 *:*
On Wednesday 13 March 2002 06:17, you wrote:
> I just listen on multiple sockets.
> > -----Original Message-----
> > From: Tavis Rudd [mailto:tavis@...]
> > Sent: Wednesday, March 13, 2002 3:23 AM
> > To: Love, Jay
> > Subject: Fwd: Re: [Webware-devel] opinions sought
> > Hi Jay,
> > do you know of a way to create a 'multihomed' socket (see below)
> > in Python or in C? Or is it neccessary to listen on multiple
> > sockets / addresses if you want to accept connections on multiple
> > IP addresses like Apache can? It just sounds like the type of
> > thing you'd know ;) Cheers,
> > Tavis
> > ---------- Forwarded Message ----------
> > Subject: Re: [Webware-devel] opinions sought
> > Date: Tue, 12 Mar 2002 12:45:52 -0800
> > From: Tavis Rudd <tavis@...>
> > To: Chuck Esterbrook <ChuckEsterbrook@...>, Geoffrey
> > Talvola <gtalvola@...>,
> > <webware-devel@...>
> > On Tuesday 12 March 2002 11:11, Chuck Esterbrook wrote:
> > > On Friday 08 March 2002 02:00 pm, Geoffrey Talvola wrote:
> > > > Opinions sought on the following:
> > ...
> > > > - People in the past have asked for a built-in HTTP server.
> > > > Assuming that he agrees to it, should we put Ng Pheng Siong's
> > > > HttpAppServer into an Experimental directory in the Webware
> > > > 0.7 release, with the appropriate disclaimers (it's not well
> > > > tested and it's not guaranteed to stay there in future
> > > > releases)? Has anyone tested this?
> > >
> > > I tried using it for an app and had the notorious problem of
> > > not being able to connect to it from outside my LAN. I couldn't
> > > figure it out and ended up just installing another instance of
> > > Apache. I think we had similar problems with the original
> > > all-in-one server. I'll be curious to see if Jay has managed to
> > > avoid this.
> > This is a matter of what addresses/ethernet devices the HTTP
> > server binds and listens to. If you tell it to listen to
> > ('localhost',8080) it will only accept localhost connections.
> > Likewise, if you have a box with two ethernet cards, each with a
> > separate IP address, you can only bind to one at a time
> > ('10.0.0.1',8080) or ('64.x.x.x',8080), unless you create a
> > 'multihomed' socket that is able to accept connections on any IP
> > address that the host server is using.
> > Here's some notes about multihomed sockets in C
> > http://wwwinfo.cern.ch/asd/lhc++/ObjectSpace/doc/2.1/comusr/socke
> >ts.6 .html
> > I haven't found anything about using them in Python yet. Anyone
> > else?? Might be a question for c.l.p
> > _______________________________________________
> > Webware-devel mailing list
> > Webware-devel@...
> > https://lists.sourceforge.net/lists/listinfo/webware-devel
> > -------------------------------------------------------