diff options
| author | zousar <[email protected]> | 2021-11-24 08:03:55 -0700 |
|---|---|---|
| committer | GitHub <[email protected]> | 2021-11-24 08:03:55 -0700 |
| commit | 4cd89c569f14b793bd4b066f5976286c19c14ac1 (patch) | |
| tree | fd30dc6fe000045ae0c73c3027e2aeae8b0481c2 /zenhttp/httpasio.cpp | |
| parent | Updated deploy script to set platform, architecture and configuration. (diff) | |
| parent | Changed the asio acceptor initialization to allow dual stack IPV6 (diff) | |
| download | zen-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.cpp | 7 |
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() |