OpenFusion/src/CNShardServer.hpp
dongresource 651ccba932 Replace ifdef guards with #pragma once
tl;dr this has potentially significant compilation speed benefits.
2020-08-23 19:14:54 +02:00

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();
};