]> git.localhorst.tv Git - blank.git/blobdiff - src/net/CongestionControl.hpp
send updates less frequently on bad connections
[blank.git] / src / net / CongestionControl.hpp
index ea71c55abe7c8625a42c31edf48f0fe8e01b2e45..7d4bacacb39a55d1e34dd5aae73367f0af678c06 100644 (file)
@@ -21,6 +21,8 @@ public:
 
        /// get recommended mode of operation
        Mode GetMode() const noexcept { return mode; }
+       /// according to current mode, drop this many unimportant packets
+       unsigned int SuggestedPacketSkip() const noexcept { return (1 << mode) - 1; }
 
        /// packet loss as factor
        float PacketLoss() const noexcept { return packet_loss; }