Hans Georg Schaathun wrote:
Is there a simple way to find the external interface and bind a
socket to it, when the hostname returned by socket.gethostname()
maps to localhost?
What seems to be the standard ubuntu configuration lists the local
hostname with 127.0.0.1 in /etc/hosts. (I checked th
On Mon, 25 Apr 2011 23:18:05 +0200, Thomas Rachel
wrote:
: 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...
Quite right. I thought it was implied by the need to bind :-)
Sorry for the lack of deta
On Tue, Apr 26, 2011 at 7:18 AM, Thomas Rachel
wrote:
> 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 cl
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
Am 25.04.2011 22:14 schrieb Hans Georg Schaathun:
On Tue, 26 Apr 2011 05:49:07 +1000, Chris Angelico
wrote:
: The way you talk of "the" external interface, I'm assuming this
: computer has only one. Is there a reason for not simply binding to
: INADDR_ANY aka 0.0.0.0?
Ah. That's wha
On Tue, Apr 26, 2011 at 6:24 AM, Hans Georg Schaathun
wrote:
> Hmmm. socket.INADDR_ANY is an integer and bind insists on a string
> for the hostname (Python 2.6). Is there any use for the integer
> constant? "0.0.0.0" does exactly what I wanted though. Thanks again.
Apologies - I've done mos
On Tue, Apr 26, 2011 at 6:14 AM, Hans Georg Schaathun
wrote:
> : The way you talk of "the" external interface, I'm assuming this
> : computer has only one. Is there a reason for not simply binding to
> : INADDR_ANY aka 0.0.0.0?
>
> Ah. That's what I really wanted. Thanks a lot. I wonder why
On Mon, 25 Apr 2011 21:14:51 +0100, Hans Georg Schaathun
wrote:
: : The way you talk of "the" external interface, I'm assuming this
: : computer has only one. Is there a reason for not simply binding to
: : INADDR_ANY aka 0.0.0.0?
:
: Ah. That's what I really wanted. Thanks a lot. I wond
On Tue, 26 Apr 2011 05:49:07 +1000, Chris Angelico
wrote:
: You can run 'ifconfig' without being root, so there must be a way. At
: very worst, parse ifconfig's output.
Of course, but I am not sure that's simpler than the manual solution.
Especially since there is more than one version of ifc
On Apr 25, 3:49 pm, Chris Angelico wrote:
> On Tue, Apr 26, 2011 at 5:37 AM, Hans Georg Schaathun
> wrote:
>
> > Has anyone found a simple solution that can be administered without
> > root privileges? I mean simpler than passing the ip address
> > manually :-)
>
> You can run 'ifconfig' withou
On Tue, Apr 26, 2011 at 5:37 AM, Hans Georg Schaathun
wrote:
> Has anyone found a simple solution that can be administered without
> root privileges? I mean simpler than passing the ip address
> manually :-)
You can run 'ifconfig' without being root, so there must be a way. At
very worst, parse
Is there a simple way to find the external interface and bind a
socket to it, when the hostname returned by socket.gethostname()
maps to localhost?
What seems to be the standard ubuntu configuration lists the local
hostname with 127.0.0.1 in /etc/hosts. (I checked this on two ubuntu
boxen, on onl
12 matches
Mail list logo