Package io.netty.handler.codec.quic
Class QuicConnectionAddress
- java.lang.Object
-
- java.net.SocketAddress
-
- io.netty.handler.codec.quic.QuicConnectionAddress
-
- All Implemented Interfaces:
java.io.Serializable
public final class QuicConnectionAddress extends java.net.SocketAddressAQuicConnectionAddressthat 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(java.nio.ByteBuffer connId)Create a new instance
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(java.lang.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 aQuicChanneljava.lang.StringtoString()
-
-
-
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(java.nio.ByteBuffer connId)
Create a new instance- Parameters:
connId- the connection id to use.
-
-
Method Detail
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equalsin classjava.lang.Object
-
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.
-
-