X-Git-Url: http://git.localhorst.tv/?a=blobdiff_plain;f=src%2Fnet%2FCongestionControl.hpp;h=7d4bacacb39a55d1e34dd5aae73367f0af678c06;hb=b9462143d9b2fd1f54aa3b4ec32eecb62c01615f;hp=ea71c55abe7c8625a42c31edf48f0fe8e01b2e45;hpb=1a237f316ee603e2130dc46b9f7d75a169763543;p=blank.git diff --git a/src/net/CongestionControl.hpp b/src/net/CongestionControl.hpp index ea71c55..7d4baca 100644 --- a/src/net/CongestionControl.hpp +++ b/src/net/CongestionControl.hpp @@ -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; }