Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #3999
| Path | csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!news.dougwise.org!nntpfeed.proxad.net!proxad.net!feeder2-2.proxad.net!newsfeed.arcor.de!newsspool1.arcor-online.net!news.arcor.de.POSTED!not-for-mail |
|---|---|
| From | Thomas Rachel <nutznetz-0c1b6768-bfa9-48d5-a470-7603bd3aa915@spamschutz.glglgl.de> |
| Newsgroups | comp.lang.python |
| Subject | Re: sockets: bind to external interface |
| Date | Mon, 25 Apr 2011 23:18:05 +0200 |
| Organization | A newly installed InterNetNews server |
| Message-ID | <ip4oed$gcc$2@r03.glglgl.eu> (permalink) |
| References | <k4vg88-0tt.ln1@svn.schaathun.net> <mailman.815.1303760950.9059.python-list@python.org> <ra1h88-e0u.ln1@svn.schaathun.net> <mailman.816.1303763462.9059.python-list@python.org> |
| Mime-Version | 1.0 |
| Content-Type | text/plain; charset=ISO-8859-1; format=flowed |
| Content-Transfer-Encoding | 7bit |
| User-Agent | Mozilla/5.0 (X11; U; Linux i686; de; rv:1.9.2.14) Gecko/20110221 SUSE/3.1.8 Thunderbird/3.1.8 |
| In-Reply-To | <mailman.816.1303763462.9059.python-list@python.org> |
| Lines | 28 |
| NNTP-Posting-Date | 25 Apr 2011 23:20:05 CEST |
| NNTP-Posting-Host | 1f9535e7.newsspool2.arcor-online.net |
| X-Trace | DXC=k6TdSbl;4UM2:OR3:3gaE@A9EHlD;3YcB4Fo<]lROoRA8kF<OcfhCOKUU_gF>4@9eBK8FCa6^2FWBOLF_]FfFg8OijeV\Q:ZI7H |
| X-Complaints-To | usenet-abuse@arcor.de |
| Xref | x330-a1.tempe.blueboxinc.net comp.lang.python:3999 |
Show key headers only | View raw
Am 25.04.2011 22:30, schrieb Chris Angelico:
> If you don't care what port you use, you don't need to bind at all.
> That may be why it's not mentioned - the classic TCP socket server
> involves bind/listen/accept, and the classic TCP client has just
> connect; bind/connect is a lot less common.
That is right, but I cannot see where he mentions the "direction" of the
socket. My fist thought was that he tries to have a server socket...
(BTW: bind can be omitted on server sockets as well; listen() seems to
includes a bind(('', 0)) if not called explicitly before. In this case,
the port is assigned randomly. Can be useful in some cases, where the
port number is not fixed...)
> Incidentally, interfaces don't have to correspond 1:1 to network
> cards. At work, we have a system of four IP addresses for each server,
> even though it has only one NIC - it's used for traffic management and
> routing. Binding to a specific address is sometimes important there.
If you use IPv6 and activate the privacy extensions (in order to
periodically create a new IP address), a NIC will have even more
addresses - the ones which aren't used any longer will be kept for a
certain time on order not to kill any existing connections.
Thomas
Back to comp.lang.python | Previous | Next — Previous in thread | Next in thread | Find similar
sockets: bind to external interface Hans Georg Schaathun <hg@schaathun.net> - 2011-04-25 20:37 +0100
Re: sockets: bind to external interface Chris Angelico <rosuav@gmail.com> - 2011-04-26 05:49 +1000
Re: sockets: bind to external interface Jean-Paul Calderone <calderone.jeanpaul@gmail.com> - 2011-04-25 13:13 -0700
Re: sockets: bind to external interface Hans Georg Schaathun <hg@schaathun.net> - 2011-04-25 21:14 +0100
Re: sockets: bind to external interface Hans Georg Schaathun <hg@schaathun.net> - 2011-04-25 21:24 +0100
Re: sockets: bind to external interface Chris Angelico <rosuav@gmail.com> - 2011-04-26 07:21 +1000
Re: sockets: bind to external interface Chris Angelico <rosuav@gmail.com> - 2011-04-26 06:30 +1000
Re: sockets: bind to external interface Thomas Rachel <nutznetz-0c1b6768-bfa9-48d5-a470-7603bd3aa915@spamschutz.glglgl.de> - 2011-04-25 23:18 +0200
Re: sockets: bind to external interface Chris Angelico <rosuav@gmail.com> - 2011-04-26 07:50 +1000
Re: sockets: bind to external interface Hans Georg Schaathun <hg@schaathun.net> - 2011-04-26 06:20 +0100
Re: sockets: bind to external interface Thomas Rachel <nutznetz-0c1b6768-bfa9-48d5-a470-7603bd3aa915@spamschutz.glglgl.de> - 2011-04-25 23:14 +0200
Re: sockets: bind to external interface Jean-Michel Pichavant <jeanmichel@sequans.com> - 2011-04-26 11:24 +0200
csiph-web