public interface QuicTokenHandler
Modifier and Type | Method and Description |
---|---|
int |
maxTokenLength()
Return the maximal token length.
|
int |
validateToken(io.netty.buffer.ByteBuf token,
java.net.InetSocketAddress address)
Validate the token and return the offset,
-1 is returned if the token is not valid. |
boolean |
writeToken(io.netty.buffer.ByteBuf out,
io.netty.buffer.ByteBuf dcid,
java.net.InetSocketAddress address)
Generate a new token for the given destination connection id and address.
|
boolean writeToken(io.netty.buffer.ByteBuf out, io.netty.buffer.ByteBuf dcid, java.net.InetSocketAddress address)
out
.
If no token should be generated and so no token validation should take place at all this method should return
false
.out
- ByteBuf
into which the token will be written.dcid
- the destination connection id.address
- the InetSocketAddress
of the sender.true
if a token was written and so validation should happen, false
otherwise.int validateToken(io.netty.buffer.ByteBuf token, java.net.InetSocketAddress address)
-1
is returned if the token is not valid.token
- the ByteBuf
that contains the token. The ownership is not transferred.address
- the InetSocketAddress
of the sender.-1
if the token was not valid.int maxTokenLength()
Copyright © 2020-2024 The Netty Project. All Rights Reserved.