|
bool | start (boost::asio::io_context &io_context, std::string const &listen_ip, uint16_t port, uint32_t threads=1, bool minimal=false) override |
| Initialize and start accepting connections asynchronously. More...
|
|
bool | stop () |
|
void | update_sessions (uint64_t time) |
|
virtual bool | start (boost::asio::io_context &io_context, std::string const &listen_ip, uint16_t port, uint32_t threads=1, bool minimal=false) |
| Initialize and start accepting connections asynchronously. More...
|
|
virtual bool | stop_network () override |
| Stop the Acceptor network and clear the client socket map. More...
|
|
void | on_socket_open (std::shared_ptr< tcp::socket > const &socket, uint32_t thread_index) |
| On Socket Open / Start Event. More...
|
|
void | set_socket_for_removal (std::weak_ptr< AuthSocket > sock) |
| Sets a socket for removal on the next session update call. More...
|
|
void | set_socket_for_management (std::shared_ptr< AuthSocket > sock) |
|
void | manage_sockets (uint32_t time) |
| Updates every session in the socket map and removes ones in the removal queue. More...
|
|
SocketMap & | get_sockets () |
|
virtual | ~SocketMgr () |
|
virtual bool | StartNetworkThreads (uint32_t threads=1) |
| Main function that deals with network thread initiation. More...
|
|
virtual bool | stop_network () |
| Stops network threads and clears the thread map. More...
|
|
uint32_t | GetNetworkThreadCount () const |
| Get the current size of the thread map. More...
|
|
uint32_t | SelectThreadWithMinConnections () const |
| Select the thread with the least number of connections, for new socket additions. More...
|
|
std::shared_ptr< AuthSocket > | on_socket_open (std::shared_ptr< tcp::socket > const &socket, uint32_t thread_index) |
| On Socket Open / Start Routine. More...
|
|
std::pair< std::shared_ptr< tcp::socket >, uint32_t > | get_new_socket () |
| Get a socket from the thread for new server connection. More...
|
|
network_thread_map & | get_thread_map () |
|
Manager of client sockets and initialization of the packet db *.
Singleton class