]> git.tdb.fi Git - libs/net.git/commitdiff
Use an IPv6 socket for Http::Server
authorMikko Rasa <tdb@tdb.fi>
Fri, 27 Sep 2019 21:37:41 +0000 (00:37 +0300)
committerMikko Rasa <tdb@tdb.fi>
Fri, 27 Sep 2019 21:37:41 +0000 (00:37 +0300)
source/http/server.cpp

index f985bf994526bf871844b97cfd263f2ee56ee2ef..20d2b397bdd474d08010ac9b5e6eb4520386da25 100644 (file)
@@ -18,11 +18,11 @@ namespace Msp {
 namespace Http {
 
 Server::Server(unsigned port):
-       sock(Net::INET),
+       sock(Net::INET6),
        event_disp(0)
 {
        sock.signal_data_available.connect(sigc::mem_fun(this, &Server::data_available));
-       RefPtr<Net::SockAddr> addr = Net::resolve("*", format("%d", port));
+       RefPtr<Net::SockAddr> addr = Net::resolve("*", format("%d", port), Net::INET6);
        sock.listen(*addr, 8);
 }