mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-15 23:20:36 +01:00
Core/Networking: Support IPv6
This commit is contained in:
@@ -22,6 +22,7 @@
|
||||
#include "IpAddress.h"
|
||||
#include "Log.h"
|
||||
#include <boost/asio/ip/tcp.hpp>
|
||||
#include <boost/asio/ip/v6_only.hpp>
|
||||
#include <atomic>
|
||||
#include <functional>
|
||||
|
||||
@@ -88,6 +89,11 @@ public:
|
||||
}
|
||||
#endif
|
||||
|
||||
// v6_only is enabled on some *BSD distributions by default
|
||||
// we want to allow both v4 and v6 connections to the same listener
|
||||
if (_endpoint.protocol() == boost::asio::ip::tcp::v6())
|
||||
_acceptor.set_option(boost::asio::ip::v6_only(false));
|
||||
|
||||
_acceptor.bind(_endpoint, errorCode);
|
||||
if (errorCode)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user