mirror of
https://github.com/EQEmu/Server.git
synced 2025-12-11 12:41:30 +00:00
* [Code] QueryServConnection Global to Singleton Cleanup * Fix missed file in PR --------- Co-authored-by: Chris Miles <akkadius1@gmail.com>
31 lines
867 B
C++
31 lines
867 B
C++
#ifndef QueryServ_H
|
|
#define QueryServ_H
|
|
|
|
#include "../common/types.h"
|
|
#include "../common/net/servertalk_server.h"
|
|
#include "../common/servertalk.h"
|
|
#include "../common/event/timer.h"
|
|
|
|
class QueryServConnection
|
|
{
|
|
public:
|
|
QueryServConnection();
|
|
void AddConnection(std::shared_ptr<EQ::Net::ServertalkServerConnection> connection);
|
|
void RemoveConnection(std::shared_ptr<EQ::Net::ServertalkServerConnection> connection);
|
|
void HandleGenericMessage(uint16_t opcode, EQ::Net::Packet &p);
|
|
void HandleLFGuildUpdateMessage(uint16_t opcode, EQ::Net::Packet &p);
|
|
bool SendPacket(ServerPacket* pack);
|
|
|
|
static QueryServConnection* Instance()
|
|
{
|
|
static QueryServConnection instance;
|
|
return &instance;
|
|
}
|
|
|
|
private:
|
|
std::map<std::string, std::shared_ptr<EQ::Net::ServertalkServerConnection>> m_streams;
|
|
std::unique_ptr<EQ::Timer> m_keepalive;
|
|
};
|
|
|
|
#endif /*QueryServ_H_*/
|