]> git.localhorst.tv Git - blank.git/blobdiff - src/net/ConnectionHandler.hpp
group entity updates in as few packets as possible
[blank.git] / src / net / ConnectionHandler.hpp
index 29595e5061e01c9bac2a8671158191cd6e768d68..6e18da2727821b754904a3ebcc39534714f3b881 100644 (file)
@@ -13,6 +13,9 @@ class ConnectionHandler {
 public:
        void Handle(const UDPpacket &);
 
+       // called as soon as the remote end ack'd given packet
+       virtual void OnPacketReceived(std::uint16_t) { }
+       // called if the remote end probably didn't get given packet
        virtual void OnPacketLost(std::uint16_t) { }
 
        virtual void OnTimeout() { }
@@ -23,6 +26,12 @@ private:
        virtual void On(const Packet::Join &) { }
        virtual void On(const Packet::Part &) { }
        virtual void On(const Packet::PlayerUpdate &) { }
+       virtual void On(const Packet::SpawnEntity &) { }
+       virtual void On(const Packet::DespawnEntity &) { }
+       virtual void On(const Packet::EntityUpdate &) { }
+       virtual void On(const Packet::PlayerCorrection &) { }
+       virtual void On(const Packet::ChunkBegin &) { }
+       virtual void On(const Packet::ChunkData &) { }
 
 };