6 #include "../../clib/logfacility.h" 7 #include "../../clib/stlutil.h" 8 #include "../../clib/threadhelp.h" 9 #include "../../plib/systemstate.h" 10 #include "../accounts/account.h" 11 #include "../mobile/charactr.h" 12 #include "../network/auxclient.h" 13 #include "../network/clienttransmit.h" 14 #include "../network/cliface.h" 15 #include "../network/msgfiltr.h" 16 #include "../network/msghandl.h" 17 #include "../network/packethooks.h" 18 #include "../network/packetinterface.h" 19 #include "../servdesc.h" 20 #include "../sockio.h" 21 #include "../sqlscrobj.h" 22 #include "../uoclient.h" 44 login_filter( nullptr ),
45 game_filter( nullptr ),
46 disconnected_filter( nullptr ),
48 packet_hook_data_v2(),
70 curl_global_init( CURL_GLOBAL_DEFAULT );
76 Clients::iterator itr =
clients.begin();
83 tmp.Format(
"Disconnecting Client#{} ({}/{})" )
85 << ( client->
chr ? client->
chr->
name() :
"[no character]" );
88 POLLOG << tmp.str() <<
"\n";
105 client->forceDisconnect();
108 for (
auto& client : clients )
127 curl_global_cleanup();
134 memset( &usage, 0,
sizeof( usage ) );
140 for (
const auto& client :
clients )
142 if ( client !=
nullptr )
148 for (
const auto& server :
servers )
149 if ( server !=
nullptr )
150 usage.
misc += server->estimateSize();
159 if ( aux !=
nullptr )
160 usage.
misc += aux->estimateSize();
166 usage.
misc += listener.estimateSize();
171 usage.
misc += 3 *
sizeof( std::unique_ptr<Network::PacketHookData>* ) +
172 packet_hook_data.capacity() *
sizeof( std::unique_ptr<Network::PacketHookData> );
173 usage.
misc += 3 *
sizeof( std::unique_ptr<Network::PacketHookData>* ) +
177 if (
hook !=
nullptr )
182 if (
hook !=
nullptr )
std::unique_ptr< Network::PacketsSingleton > packetsSingleton
static void createMessageFilter()
std::vector< Network::AuxService * > auxservices
static void Delete(Client *client)
int deinit_sockets_library(void)
std::vector< std::unique_ptr< Network::PacketHookData > > packet_hook_data_v2
std::unique_ptr< threadhelp::DynTaskThreadPool > auxthreadpool
Memory estimateSize() const
NetworkManager networkManager
std::vector< std::unique_ptr< Network::PacketHookData > > packet_hook_data
const char * name() const
void hook(ExportScript *shs, const std::string &hookname, const std::string &exfuncname)
std::vector< Network::IPRule > banned_ips
void kill_disconnected_clients()
size_t estimateSize() const
UoClientProtocol uoclient_protocol
bool isReallyConnected() const
static void initialize_msg_handlers()
size_t estimateSize() const
std::vector< UoClientListener > uoclient_listeners
virtual std::string name() const
Network::PolSocket polsocket
static void initializeGameData(std::vector< std::unique_ptr< PacketHookData >> *data)
UoClientGeneral uoclient_general