Class Dedup
java.lang.Object
io.github.mahmoudimus.quic.connection.Dedup
A sliding-window detector of duplicate packet numbers, in the style of RFC 4303: a 128-bit
field, one bit per packet number below the highest authenticated one. Packet numbers left of the
window count as received. Since QUIC never reuses packet numbers, the window only needs to cover
reordering.
Threads. Not thread-safe; owned by one connection.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleaninsert(long packet) Records an authenticated packet number.
-
Constructor Details
-
Dedup
public Dedup()An empty window at packet number zero.
-
-
Method Details
-
insert
public boolean insert(long packet) Records an authenticated packet number.- Parameters:
packet- the packet number- Returns:
- true if the packet may be a duplicate
-