aboutsummaryrefslogtreecommitdiff
path: root/zenhttp/httpasio.cpp
diff options
context:
space:
mode:
authorzousar <[email protected]>2021-11-24 08:03:55 -0700
committerGitHub <[email protected]>2021-11-24 08:03:55 -0700
commit4cd89c569f14b793bd4b066f5976286c19c14ac1 (patch)
treefd30dc6fe000045ae0c73c3027e2aeae8b0481c2 /zenhttp/httpasio.cpp
parentUpdated deploy script to set platform, architecture and configuration. (diff)
parentChanged the asio acceptor initialization to allow dual stack IPV6 (diff)
downloadzen-4cd89c569f14b793bd4b066f5976286c19c14ac1.tar.xz
zen-4cd89c569f14b793bd4b066f5976286c19c14ac1.zip
Merge pull request #27 from EpicGames/asio-acceptor
Changed the asio acceptor initialization to allow dual stack IPV6 connections.
Diffstat (limited to 'zenhttp/httpasio.cpp')
-rw-r--r--zenhttp/httpasio.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/zenhttp/httpasio.cpp b/zenhttp/httpasio.cpp
index 4e4646e3b..d5fe9adbb 100644
--- a/zenhttp/httpasio.cpp
+++ b/zenhttp/httpasio.cpp
@@ -868,8 +868,13 @@ struct HttpAcceptor
HttpAcceptor(HttpAsioServerImpl& Server, asio::io_service& IoService, uint16_t Port)
: m_Server(Server)
, m_IoService(IoService)
- , m_Acceptor(m_IoService, asio::ip::tcp::endpoint(asio::ip::address_v4::any(), Port))
+ , m_Acceptor(m_IoService, asio::ip::tcp::v6())
{
+ m_Acceptor.set_option(asio::ip::v6_only(false));
+ m_Acceptor.set_option(asio::socket_base::reuse_address(true));
+ m_Acceptor.set_option(asio::ip::tcp::no_delay(true));
+ m_Acceptor.bind(asio::ip::tcp::endpoint(asio::ip::address_v6::any(), Port));
+ m_Acceptor.listen();
}
void Start()