1 #ifndef BLANK_NET_CONNECTION_HPP_
2 #define BLANK_NET_CONNECTION_HPP_
5 #include "../app/IntervalTimer.hpp"
16 explicit Connection(const IPaddress &);
18 const IPaddress &Address() const noexcept { return addr; }
20 bool Matches(const IPaddress &) const noexcept;
22 bool ShouldPing() const noexcept;
23 bool TimedOut() const noexcept;
27 void SendPing(UDPpacket &, UDPsocket);
29 void Send(UDPpacket &, UDPsocket);
30 void Received(const UDPpacket &);
33 void FlagSend() noexcept;
34 void FlagRecv() noexcept;
38 IntervalTimer send_timer;
39 IntervalTimer recv_timer;
41 Packet::TControl ctrl;