![]() |
TrinityCore
|
Manages all sockets connected to peers and network threads. More...
#include <WorldSocketMgr.h>
Inheritance diagram for WorldSocketMgr:Public Member Functions | |
| bool | StartWorldNetwork (Trinity::Asio::IoContext &ioContext, std::string const &bindIp, uint16 port, int networkThreads) |
| Start network, listen at address:port . | |
| void | StopNetwork () override |
| Stops all network threads, It will wait for all running threads . | |
| void | OnSocketOpen (Trinity::Net::IoContextTcpSocket &&sock, uint32 threadIndex) override |
| std::size_t | GetApplicationSendBufferSize () const |
Public Member Functions inherited from Trinity::Net::SocketMgr< WorldSocket > | |
| SocketMgr (SocketMgr const &)=delete | |
| SocketMgr (SocketMgr &&)=delete | |
| SocketMgr & | operator= (SocketMgr const &)=delete |
| SocketMgr & | operator= (SocketMgr &&)=delete |
| virtual | ~SocketMgr () |
| virtual bool | StartNetwork (Asio::IoContext &ioContext, std::string const &bindIp, uint16 port, int threadCount) |
| void | Wait () |
| int32 | GetNetworkThreadCount () const |
| uint32 | SelectThreadWithMinConnections () const |
| std::pair< IoContextTcpSocket *, uint32 > | GetSocketForAccept () |
Static Public Member Functions | |
| static WorldSocketMgr & | Instance () |
Protected Member Functions | |
| WorldSocketMgr () | |
| Trinity::Net::NetworkThread< WorldSocket > * | CreateThreads () const override |
Protected Member Functions inherited from Trinity::Net::SocketMgr< WorldSocket > | |
| SocketMgr () | |
Private Types | |
| typedef SocketMgr< WorldSocket > | BaseSocketMgr |
Private Attributes | |
| int32 | _socketSystemSendBufferSize |
| int32 | _socketApplicationSendBufferSize |
| bool | _tcpNoDelay |
Additional Inherited Members | |
Protected Attributes inherited from Trinity::Net::SocketMgr< WorldSocket > | |
| std::unique_ptr< AsyncAcceptor > | _acceptor |
| std::unique_ptr< NetworkThread< WorldSocket >[]> | _threads |
| int32 | _threadCount |
Manages all sockets connected to peers and network threads.
Definition at line 26 of file WorldSocketMgr.h.
|
private |
Definition at line 28 of file WorldSocketMgr.h.
|
protected |
Definition at line 41 of file WorldSocketMgr.cpp.
|
overrideprotectedvirtual |
Implements Trinity::Net::SocketMgr< WorldSocket >.
Definition at line 119 of file WorldSocketMgr.cpp.
Here is the call graph for this function:
|
inline |
Definition at line 41 of file WorldSocketMgr.h.
|
static |
Definition at line 45 of file WorldSocketMgr.cpp.
|
overridevirtual |
Reimplemented from Trinity::Net::SocketMgr< WorldSocket >.
Definition at line 88 of file WorldSocketMgr.cpp.
Here is the caller graph for this function:| bool WorldSocketMgr::StartWorldNetwork | ( | Trinity::Asio::IoContext & | ioContext, |
| std::string const & | bindIp, | ||
| uint16 | port, | ||
| int | networkThreads | ||
| ) |
Start network, listen at address:port .
Definition at line 51 of file WorldSocketMgr.cpp.
Here is the call graph for this function:
|
overridevirtual |
Stops all network threads, It will wait for all running threads .
Reimplemented from Trinity::Net::SocketMgr< WorldSocket >.
Definition at line 81 of file WorldSocketMgr.cpp.
|
private |
Definition at line 50 of file WorldSocketMgr.h.
|
private |
Definition at line 49 of file WorldSocketMgr.h.
|
private |
Definition at line 51 of file WorldSocketMgr.h.