TrinityCore
Battlenet::SessionManager Class Reference

#include <SessionManager.h>

+ Inheritance diagram for Battlenet::SessionManager:

Public Member Functions

bool StartNetwork (Trinity::Asio::IoContext &ioContext, std::string const &bindIp, uint16 port, int threadCount=1) override
 
- Public Member Functions inherited from SocketMgr< Session >
virtual ~SocketMgr ()
 
virtual bool StartNetwork (Trinity::Asio::IoContext &ioContext, std::string const &bindIp, uint16 port, int threadCount)
 
virtual void StopNetwork ()
 
void Wait ()
 
virtual void OnSocketOpen (boost::asio::ip::tcp::socket &&sock, uint32 threadIndex)
 
int32 GetNetworkThreadCount () const
 
uint32 SelectThreadWithMinConnections () const
 
std::pair< boost::asio::ip::tcp::socket *, uint32GetSocketForAccept ()
 

Static Public Member Functions

static SessionManagerInstance ()
 

Protected Member Functions

NetworkThread< Session > * CreateThreads () const override
 
- Protected Member Functions inherited from SocketMgr< Session >
 SocketMgr ()
 
virtual NetworkThread< Session > * CreateThreads () const=0
 

Private Types

typedef SocketMgr< SessionBaseSocketMgr
 

Static Private Member Functions

static void OnSocketAccept (boost::asio::ip::tcp::socket &&sock, uint32 threadIndex)
 

Additional Inherited Members

- Protected Attributes inherited from SocketMgr< Session >
AsyncAcceptor_acceptor
 
NetworkThread< Session > * _threads
 
int32 _threadCount
 

Detailed Description

Definition at line 26 of file SessionManager.h.

Member Typedef Documentation

◆ BaseSocketMgr

Definition at line 28 of file SessionManager.h.

Member Function Documentation

◆ CreateThreads()

NetworkThread< Battlenet::Session > * Battlenet::SessionManager::CreateThreads ( ) const
overrideprotectedvirtual

Implements SocketMgr< Session >.

Definition at line 31 of file SessionManager.cpp.

◆ Instance()

Battlenet::SessionManager & Battlenet::SessionManager::Instance ( )
static

Definition at line 41 of file SessionManager.cpp.

◆ OnSocketAccept()

void Battlenet::SessionManager::OnSocketAccept ( boost::asio::ip::tcp::socket &&  sock,
uint32  threadIndex 
)
staticprivate

Definition at line 36 of file SessionManager.cpp.

+ Here is the caller graph for this function:

◆ StartNetwork()

bool Battlenet::SessionManager::StartNetwork ( Trinity::Asio::IoContext ioContext,
std::string const &  bindIp,
uint16  port,
int  threadCount = 1 
)
overridevirtual

Reimplemented from SocketMgr< Session >.

Definition at line 22 of file SessionManager.cpp.

+ Here is the call graph for this function:

The documentation for this class was generated from the following files: