![]() |
TrinityCore
|
Manages all sockets connected to peers and network threads. More...
#include <WorldSocketMgr.h>
Public Member Functions | |
~WorldSocketMgr () | |
bool | StartNetwork (boost::asio::io_service &service, std::string const &bindIp, uint16 port, int networkThreads) override |
Start network, listen at address:port . More... | |
void | StopNetwork () override |
Stops all network threads, It will wait for all running threads . More... | |
void | OnSocketOpen (tcp::socket &&sock, uint32 threadIndex) override |
![]() | |
virtual | ~SocketMgr () |
void | Wait () |
int32 | GetNetworkThreadCount () const |
uint32 | SelectThreadWithMinConnections () const |
std::pair< tcp::socket *, uint32 > | GetSocketForAccept () |
Static Public Member Functions | |
static WorldSocketMgr & | Instance () |
Protected Member Functions | |
WorldSocketMgr () | |
NetworkThread< WorldSocket > * | CreateThreads () const override |
![]() | |
SocketMgr () | |
Private Types | |
typedef SocketMgr< WorldSocket > | BaseSocketMgr |
Private Attributes | |
AsyncAcceptor * | _instanceAcceptor |
int32 | _socketSendBufferSize |
int32 | m_SockOutUBuff |
bool | _tcpNoDelay |
Additional Inherited Members | |
![]() | |
AsyncAcceptor * | _acceptor |
NetworkThread< WorldSocket > * | _threads |
int32 | _threadCount |
Manages all sockets connected to peers and network threads.
|
private |
WorldSocketMgr::~WorldSocketMgr | ( | ) |
|
protected |
|
overrideprotectedvirtual |
Implements SocketMgr< WorldSocket >.
|
static |
|
overridevirtual |
Reimplemented from SocketMgr< WorldSocket >.
|
overridevirtual |
Start network, listen at address:port .
Reimplemented from SocketMgr< WorldSocket >.
|
overridevirtual |
Stops all network threads, It will wait for all running threads .
Reimplemented from SocketMgr< WorldSocket >.
|
private |
|
private |
|
private |
|
private |