Package io.github.mahmoudimus.quic.token
Interface TokenStore
- All Known Implementing Classes:
TokenMemoryCache
public interface TokenStore
Where a client keeps the address validation tokens servers send in NEW_TOKEN frames (RFC 9000
section 8.1.3), by server name, to present in the first Initial of a later connection so the
server can skip its Retry round trip.
A token must never be handed out twice: reusing one would let observers link connections (RFC 9000 section 8.1.3). Implementations must be thread-safe.
-
Field Summary
Fields -
Method Summary
-
Field Details
-
NONE
A store that keeps nothing.
-
-
Method Details
-
put
Keeps a token for later, one-time use.- Parameters:
serverName- the server it came fromtoken- the token
-
take
Takes a token for a server, removing it.- Parameters:
serverName- the server- Returns:
- the token, or null if there is none
-