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.SocketAddress
AQuicConnectionAddress
that can be used to connect too.- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static QuicConnectionAddress
EPHEMERAL
SpecialQuicConnectionAddress
that 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 boolean
equals(java.lang.Object obj)
int
hashCode()
static QuicConnectionAddress
random()
Return a random generatedQuicConnectionAddress
of maximum size that can be used to connect aQuicChannel
static QuicConnectionAddress
random(int length)
Return a random generatedQuicConnectionAddress
of a given length that can be used to connect aQuicChannel
java.lang.String
toString()
-
-
-
Field Detail
-
EPHEMERAL
public static final QuicConnectionAddress EPHEMERAL
SpecialQuicConnectionAddress
that 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:
toString
in classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equals
in classjava.lang.Object
-
random
public static QuicConnectionAddress random(int length)
Return a random generatedQuicConnectionAddress
of a given length that can be used to connect aQuicChannel
- Parameters:
length
- the length of theQuicConnectionAddress
to generate.- Returns:
- the generated address.
-
random
public static QuicConnectionAddress random()
Return a random generatedQuicConnectionAddress
of maximum size that can be used to connect aQuicChannel
- Returns:
- the generated address.
-
-