From: Mikko Rasa Date: Wed, 10 Aug 2011 18:07:08 +0000 (+0300) Subject: Change listen address construction X-Git-Url: http://git.tdb.fi/?a=commitdiff_plain;h=d683ca0964182e9579838fec8d7d100eeabddee0;p=libs%2Fnet.git Change listen address construction --- 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