feat(Core/Socket): make world OnSocketAccept like auth (#8946)

This commit is contained in:
Kargatum
2021-11-05 00:42:34 +07:00
committed by GitHub
parent 8ac01da463
commit 21214d12c8
2 changed files with 6 additions and 6 deletions

View File

@@ -22,11 +22,6 @@
#include "WorldSocketMgr.h"
#include <boost/system/error_code.hpp>
static void OnSocketAccept(tcp::socket&& sock, uint32 threadIndex)
{
sWorldSocketMgr.OnSocketOpen(std::forward<tcp::socket>(sock), threadIndex);
}
class WorldSocketThread : public NetworkThread<WorldSocket>
{
public:
@@ -73,7 +68,7 @@ bool WorldSocketMgr::StartWorldNetwork(Acore::Asio::IoContext& ioContext, std::s
if (!BaseSocketMgr::StartNetwork(ioContext, bindIp, port, threadCount))
return false;
_acceptor->AsyncAcceptWithCallback<&OnSocketAccept>();
_acceptor->AsyncAcceptWithCallback<&WorldSocketMgr::OnSocketAccept>();
sScriptMgr->OnNetworkStart();
return true;