本文整理汇总了C++中ZSList::Remove方法的典型用法代码示例。如果您正苦于以下问题:C++ ZSList::Remove方法的具体用法?C++ ZSList::Remove怎么用?C++ ZSList::Remove使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ZSList
的用法示例。
在下文中一共展示了ZSList::Remove方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: main
//.........这里部分代码省略.........
database.PurgeExpiredInstances();
Timer PurgeInstanceTimer(450000);
PurgeInstanceTimer.Start(450000);
Log(Logs::General, Logs::World_Server, "Loading char create info...");
database.LoadCharacterCreateAllocations();
database.LoadCharacterCreateCombos();
std::unique_ptr<EQ::Net::ConsoleServer> console;
if (Config->TelnetEnabled) {
Log(Logs::General, Logs::World_Server, "Console (TCP) listener started.");
console.reset(new EQ::Net::ConsoleServer(Config->TelnetIP, Config->TelnetTCPPort));
RegisterConsoleFunctions(console);
}
std::unique_ptr<EQ::Net::ServertalkServer> server_connection;
server_connection.reset(new EQ::Net::ServertalkServer());
EQ::Net::ServertalkServerOptions server_opts;
server_opts.port = Config->WorldTCPPort;
server_opts.ipv6 = false;
server_opts.credentials = Config->SharedKey;
server_connection->Listen(server_opts);
Log(Logs::General, Logs::World_Server, "Server (TCP) listener started.");
server_connection->OnConnectionIdentified("Zone", [&console](std::shared_ptr<EQ::Net::ServertalkServerConnection> connection) {
LogF(Logs::General, Logs::World_Server, "New Zone Server connection from {2} at {0}:{1}",
connection->Handle()->RemoteIP(), connection->Handle()->RemotePort(), connection->GetUUID());
numzones++;
zoneserver_list.Add(new ZoneServer(connection, console.get()));
});
server_connection->OnConnectionRemoved("Zone", [](std::shared_ptr<EQ::Net::ServertalkServerConnection> connection) {
LogF(Logs::General, Logs::World_Server, "Removed Zone Server connection from {0}",
connection->GetUUID());
numzones--;
zoneserver_list.Remove(connection->GetUUID());
});
server_connection->OnConnectionIdentified("Launcher", [](std::shared_ptr<EQ::Net::ServertalkServerConnection> connection) {
LogF(Logs::General, Logs::World_Server, "New Launcher connection from {2} at {0}:{1}",
connection->Handle()->RemoteIP(), connection->Handle()->RemotePort(), connection->GetUUID());
launcher_list.Add(connection);
});
server_connection->OnConnectionRemoved("Launcher", [](std::shared_ptr<EQ::Net::ServertalkServerConnection> connection) {
LogF(Logs::General, Logs::World_Server, "Removed Launcher connection from {0}",
connection->GetUUID());
launcher_list.Remove(connection);
});
server_connection->OnConnectionIdentified("QueryServ", [](std::shared_ptr<EQ::Net::ServertalkServerConnection> connection) {
LogF(Logs::General, Logs::World_Server, "New Query Server connection from {2} at {0}:{1}",
connection->Handle()->RemoteIP(), connection->Handle()->RemotePort(), connection->GetUUID());
QSLink.AddConnection(connection);
});
server_connection->OnConnectionRemoved("QueryServ", [](std::shared_ptr<EQ::Net::ServertalkServerConnection> connection) {
LogF(Logs::General, Logs::World_Server, "Removed Query Server connection from {0}",
connection->GetUUID());