From d683ca0964182e9579838fec8d7d100eeabddee0 Mon Sep 17 00:00:00 2001 From: Mikko Rasa Date: Wed, 10 Aug 2011 21:07:08 +0300 Subject: [PATCH] Change listen address construction --- source/server.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/source/server.cpp b/source/server.cpp index 259d13b..9205cc1 100644 --- a/source/server.cpp +++ b/source/server.cpp @@ -1,7 +1,9 @@ #include #include #include +#include #include +#include #include "request.h" #include "response.h" #include "server.h" @@ -16,7 +18,8 @@ Server::Server(unsigned port): event_disp(0) { sock.signal_data_available.connect(sigc::mem_fun(this, &Server::data_available)); - sock.listen(Net::InetAddr(0, port), 8); + RefPtr addr = Net::resolve("*", format("%d", port)); + sock.listen(*addr, 8); } unsigned Server::get_port() const -- 2.45.2