Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > sockets: bind to external interface

Reply
Thread Tools

sockets: bind to external interface

 
 
Hans Georg Schaathun
Guest
Posts: n/a
 
      04-26-2011
On Mon, 25 Apr 2011 23:18:05 +0200, Thomas Rachel
<nutznetz-0c1b6768-bfa9-48d5-a470-> 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 detail.

--
:-- Hans Georg
 
Reply With Quote
 
 
 
 
Jean-Michel Pichavant
Guest
Posts: n/a
 
      04-26-2011
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 this on two ubuntu
> boxen, on only one of which I am root.) Thus, the standard solution
> of binding to whatever socket.gethostname() returns does not work.
>
> Has anyone found a simple solution that can be administered without
> root privileges? I mean simpler than passing the ip address
> manually
>
> TIA
>

Hi,

Use the address 0.0.0.0

JM
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
confused by boost::bind & boost::lambda::bind XHengDF@gmail.com C++ 0 05-29-2007 04:37 AM
Using a data-bind dropdownlist to populate another data-bind dropdownlist mr2_93 ASP .Net 1 10-02-2005 05:07 PM
Is there a way to bind a socket to a specific local interface ina client application? Joshua M. Miller Ruby 3 03-29-2005 01:48 AM
PCI interface or USB interface David Wireless Networking 4 09-16-2004 01:01 PM
static nat between phisical interface and virtual interface on same ethernet Andrea Cisco 0 04-19-2004 09:37 AM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57