OpenFusion/src/CNShardServer.hpp
dongresource 0ac600e223 Extracted all packet ids to a single, definitive enum.
It also contains other constant values that might be relevant at some
point.
2020-08-22 17:25:42 +02:00

25 lines
485 B
C++

#ifndef _CNSS_HPP
#define _CNSS_HPP
#include "CNProtocol.hpp"
#include "Defines.hpp"
#include <map>
#define REGISTER_SHARD_PACKET(pactype, handlr) CNShardServer::ShardPackets[pactype] = handlr;
class CNShardServer : public CNServer {
private:
static void handlePacket(CNSocket* sock, CNPacketData* data);
public:
static std::map<uint32_t, PacketHandler> ShardPackets;
CNShardServer(uint16_t p);
void killConnection(CNSocket* cns);
void onTimer();
};
#endif