]> git.localhorst.tv Git - blank.git/blobdiff - src/net/Connection.hpp
defined and implemented join and part packets
[blank.git] / src / net / Connection.hpp
index ade65ebd4d955939ead5a4840409c5d5bbb5db58..cc13ef60915df48dc676228535c50101f0eccc9d 100644 (file)
@@ -22,6 +22,9 @@ public:
        bool ShouldPing() const noexcept;
        bool TimedOut() const noexcept;
 
+       void Close() noexcept { closed = true; }
+       bool Closed() const noexcept { return closed || TimedOut(); }
+
        void Update(int dt);
 
        void SendPing(UDPpacket &, UDPsocket);
@@ -40,6 +43,8 @@ private:
 
        Packet::TControl ctrl;
 
+       bool closed;
+
 };
 
 }