#ifndef EVENT_H
#define EVENT_H

#include "net.h"

// Each handler receives Packet* and the client socket
typedef void (*PacketHandler)(Packet*, SOCKET client);

// Register a handler for a certain PacketType
void register_handler(uint8_t type, PacketHandler handler);

// Dispatch a packet
void handle_packet(Packet* pkt, SOCKET client);

#endif
