Re: SoupServer bind to link-local
- From: Kai Lüke <kailueke riseup net>
- To: libsoup-list gnome org
- Subject: Re: SoupServer bind to link-local
- Date: Wed, 31 Jul 2013 21:25:12 +0200
Am 31.07.2013 21:05, schrieb Dan Winship:
On 07/31/2013 01:50 PM, Kai Lüke wrote:
is it somehow possible to use SoupServer and bind it to a specific
IP/interface? Setting the interface property to SoupAddress created with
new_any works, but I don't want to use 0.0.0.0 but e.g. 127.0.0.1.
Actually I think it might be possible with new_from_sockaddr, but I
don't get the python-bindings (gir) for this function and couldn't
figure out how to combine it with "import socks" C sockets.
Yeah, soup_address_new_from_sockaddr() isn't introspectable.
But soup_address_new("127.0.0.1", port) will work. (Um... except you
might need to call resolve_sync() on the address after creating it.)
-- Dan
Hey,
thanks for this. It's doing the job :)
addr = Soup.Address.new("127.0.0.1", 8000)
addr.resolve_sync(None)
server = Soup.Server(port=8000, …, interface=addr)
For now I'm happy.
But listening on IPv6 and IPv4 link-local doesn't seem possible, right?
I mean listening on just two instead of all like in Any.
Many greetings,
Kai
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]