OpenFusion/src/CNShardServer.hpp

23 lines
493 B
C++
Raw Normal View History

#pragma once
2020-08-18 20:42:30 +00:00
#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);
2020-08-22 23:31:09 +00:00
void newConnection(CNSocket* cns);
2020-08-18 20:42:30 +00:00
void killConnection(CNSocket* cns);
2020-08-19 01:34:39 +00:00
void onTimer();
2020-08-18 20:42:30 +00:00
};