diff options
| author | Per Larsson <[email protected]> | 2021-11-24 18:03:24 +0100 |
|---|---|---|
| committer | Per Larsson <[email protected]> | 2021-11-24 18:03:24 +0100 |
| commit | b2cc49b7676d4e521adb7efed0d3967a7938221c (patch) | |
| tree | 4fac9b440a94851146b4e0e4c40db6778b02b0a9 /zenhttp/httpasio.cpp | |
| parent | Added bundle xmake task. (diff) | |
| parent | Merge pull request #27 from EpicGames/asio-acceptor (diff) | |
| download | zen-b2cc49b7676d4e521adb7efed0d3967a7938221c.tar.xz zen-b2cc49b7676d4e521adb7efed0d3967a7938221c.zip | |
Merge branch 'main' of https://github.com/EpicGames/zen
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() |