public interface QuicTokenHandler
| Modifier and Type | Method and Description |
|---|---|
int |
maxTokenLength()
Return the maximal token length.
|
int |
validateToken(io.netty.buffer.ByteBuf token,
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,
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,
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,
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–2021 The Netty Project. All rights reserved.