Hi,
On Sun, 7 Sep 2014 15:34:02 +0800
Che-Wei Lin <[email protected]> wrote:
> I fixed some trivial minor bug and corrected some typos in the document.
>
> I found that when i want to get the REAL IP.
> The old version used on Ubuntu python's stdlib socket.gethostbyname return
> 127.0.0.1.
I guess that a host can have multiple real IP addresses and 127.0.0.1
is one of them.
If I understand your code correctly, you try to connect to 8.8.8.8 and
use the address to access to 8.8.8.8 for binding a listen port. I'm
not sure if it is a good idea because:
1) A host could not access to the internet (8.8.8.8) due to many
reasons (firewall, etc).
2) Even a host can, the address for accessing to the Internet is not
appropriate for a listen port for this application.
Why not?
bind(('0.0.0.0', port))
> This patch I am using another way to get the real IP
------------------------------------------------------------------------------
Slashdot TV.
Video for Nerds. Stuff that matters.
http://tv.slashdot.org/
_______________________________________________
Ryu-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ryu-devel