OpenFusion/src/CNShardServer.hpp

25 lines
485 B
C++
Raw Normal View History

2020-08-18 20:42:30 +00:00
#ifndef _CNSS_HPP
#define _CNSS_HPP
#include "CNProtocol.hpp"
#include "Defines.hpp"
2020-08-18 20:42:30 +00:00
#include <map>
#define REGISTER_SHARD_PACKET(pactype, handlr) CNShardServer::ShardPackets[pactype] = handlr;
class CNShardServer : public CNServer {
private:
static void handlePacket(CNSocket* sock, CNPacketData* data);
2020-08-19 00:11:31 +00:00
2020-08-18 20:42:30 +00:00
public:
static std::map<uint32_t, PacketHandler> ShardPackets;
CNShardServer(uint16_t p);
void killConnection(CNSocket* cns);
2020-08-19 01:34:39 +00:00
void onTimer();
2020-08-18 20:42:30 +00:00
};
#endif