mirror of
https://github.com/OpenFusionProject/OpenFusion.git
synced 2024-11-05 06:50:04 +00:00
23 lines
493 B
C++
23 lines
493 B
C++
#pragma once
|
|
|
|
#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 newConnection(CNSocket* cns);
|
|
void killConnection(CNSocket* cns);
|
|
void onTimer();
|
|
};
|