AzerothCore 3.3.5a
OpenSource WoW Emulator
|
#include "SocketMgr.h"
Public Member Functions | |
virtual | ~SocketMgr () |
virtual bool | StartNetwork (Acore::Asio::IoContext &ioContext, std::string const &bindIp, uint16 port, int threadCount) |
virtual void | StopNetwork () |
void | Wait () |
virtual void | OnSocketOpen (tcp::socket &&sock, uint32 threadIndex) |
int32 | GetNetworkThreadCount () const |
uint32 | SelectThreadWithMinConnections () const |
std::pair< tcp::socket *, uint32 > | GetSocketForAccept () |
Protected Member Functions | |
SocketMgr ()=default | |
virtual NetworkThread< SocketType > * | CreateThreads () const =0 |
Protected Attributes | |
std::unique_ptr< AsyncAcceptor > | _acceptor |
std::unique_ptr< NetworkThread< SocketType >[]> | _threads |
int32 | _threadCount {} |
References SocketMgr< SocketType >::_acceptor, SocketMgr< SocketType >::_threadCount, SocketMgr< SocketType >::_threads, and ASSERT.
|
protecteddefault |
|
protectedpure virtual |
Implemented in AuthSocketMgr, and WorldSocketMgr.
Referenced by SocketMgr< SocketType >::StartNetwork().
References SocketMgr< SocketType >::_threadCount.
|
inline |
References SocketMgr< SocketType >::_threads, and SocketMgr< SocketType >::SelectThreadWithMinConnections().
Referenced by SocketMgr< SocketType >::StartNetwork().
|
inlinevirtual |
Reimplemented in WorldSocketMgr.
References SocketMgr< SocketType >::_threads, and LOG_WARN.
Referenced by AuthSocketMgr::OnSocketAccept().
|
inline |
References SocketMgr< SocketType >::_threadCount, and SocketMgr< SocketType >::_threads.
Referenced by SocketMgr< SocketType >::GetSocketForAccept().
|
inlinevirtual |
Reimplemented in AuthSocketMgr.
References SocketMgr< SocketType >::_acceptor, SocketMgr< SocketType >::_threadCount, SocketMgr< SocketType >::_threads, ASSERT, SocketMgr< SocketType >::CreateThreads(), SocketMgr< SocketType >::GetSocketForAccept(), and LOG_ERROR.
|
inlinevirtual |
Reimplemented in WorldSocketMgr.
References SocketMgr< SocketType >::_acceptor, SocketMgr< SocketType >::_threadCount, SocketMgr< SocketType >::_threads, and SocketMgr< SocketType >::Wait().
|
inline |
|
protected |
|
protected |
Referenced by SocketMgr< SocketType >::GetSocketForAccept(), SocketMgr< SocketType >::OnSocketOpen(), SocketMgr< SocketType >::SelectThreadWithMinConnections(), SocketMgr< SocketType >::StartNetwork(), SocketMgr< SocketType >::StopNetwork(), SocketMgr< SocketType >::Wait(), and SocketMgr< SocketType >::~SocketMgr().