Package io.netty.handler.codec.quic
Class QuicConnectionAddress
- java.lang.Object
-
- java.net.SocketAddress
-
- io.netty.handler.codec.quic.QuicConnectionAddress
-
- All Implemented Interfaces:
Serializable
public final class QuicConnectionAddress extends SocketAddress
AQuicConnectionAddressthat can be used to connect too.- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static QuicConnectionAddressEPHEMERALSpecialQuicConnectionAddressthat should be used when the connection address should be generated and chosen on the fly.
-
Constructor Summary
Constructors Constructor Description QuicConnectionAddress(byte[] connId)Create a new instanceQuicConnectionAddress(ByteBuffer connId)Create a new instance
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object obj)inthashCode()static QuicConnectionAddressrandom()Return a random generatedQuicConnectionAddressof maximum size that can be used to connect aQuicChannelstatic QuicConnectionAddressrandom(int length)Return a random generatedQuicConnectionAddressof a given length that can be used to connect aQuicChannelStringtoString()
-
-
-
Field Detail
-
EPHEMERAL
public static final QuicConnectionAddress EPHEMERAL
SpecialQuicConnectionAddressthat should be used when the connection address should be generated and chosen on the fly.
-
-
Constructor Detail
-
QuicConnectionAddress
public QuicConnectionAddress(byte[] connId)
Create a new instance- Parameters:
connId- the connection id to use.
-
QuicConnectionAddress
public QuicConnectionAddress(ByteBuffer connId)
Create a new instance- Parameters:
connId- the connection id to use.
-
-
Method Detail
-
random
public static QuicConnectionAddress random(int length)
Return a random generatedQuicConnectionAddressof a given length that can be used to connect aQuicChannel- Parameters:
length- the length of theQuicConnectionAddressto generate.- Returns:
- the generated address.
-
random
public static QuicConnectionAddress random()
Return a random generatedQuicConnectionAddressof maximum size that can be used to connect aQuicChannel- Returns:
- the generated address.
-
-