![]() |
TrinityCore
|
#include <AsyncAcceptor.h>
Public Member Functions | |
| AsyncAcceptor (Asio::IoContext &ioContext, std::string const &bindIp, uint16 port) | |
| template<AcceptCallback Callback> | |
| void | AsyncAccept (Callback &&acceptCallback) |
| bool | Bind () |
| void | Close () |
| void | SetSocketFactory (std::function< std::pair< IoContextTcpSocket *, uint32 >()> func) |
Private Member Functions | |
| std::pair< IoContextTcpSocket *, uint32 > | DefeaultSocketFactory () |
Private Attributes | |
| boost::asio::basic_socket_acceptor< boost::asio::ip::tcp, IoContextTcpSocket::executor_type > | _acceptor |
| boost::asio::ip::tcp::endpoint | _endpoint |
| IoContextTcpSocket | _socket |
| std::atomic< bool > | _closed |
| std::function< std::pair< IoContextTcpSocket *, uint32 >()> | _socketFactory |
Definition at line 38 of file AsyncAcceptor.h.
|
inline |
Definition at line 41 of file AsyncAcceptor.h.
|
inline |
Definition at line 48 of file AsyncAcceptor.h.
References _acceptor, _closed, _socketFactory, AsyncAccept(), and TC_LOG_INFO.
Referenced by AsyncAccept().
|
inline |
Definition at line 75 of file AsyncAcceptor.h.
References _acceptor, _endpoint, TC_LOG_INFO, and TRINITY_MAX_LISTEN_CONNECTIONS.
|
inline |
Definition at line 111 of file AsyncAcceptor.h.
|
inlineprivate |
Definition at line 123 of file AsyncAcceptor.h.
References _socket.
|
inline |
Definition at line 120 of file AsyncAcceptor.h.
References _socketFactory.
|
private |
Definition at line 125 of file AsyncAcceptor.h.
Referenced by AsyncAccept(), Bind(), and Close().
|
private |
Definition at line 128 of file AsyncAcceptor.h.
Referenced by AsyncAccept(), and Close().
|
private |
Definition at line 126 of file AsyncAcceptor.h.
Referenced by Bind().
|
private |
Definition at line 127 of file AsyncAcceptor.h.
Referenced by DefeaultSocketFactory().
|
private |
Definition at line 129 of file AsyncAcceptor.h.
Referenced by AsyncAccept(), and SetSocketFactory().