public final class ConnectionIdExtension extends HelloExtension
See draft-ietf-tls-dtls-connection-id for additional details.
HelloExtension.ExtensionTypeLENGTH_BITS, TYPE_BITS| Modifier and Type | Method and Description |
|---|---|
protected void |
addExtensionData(org.eclipse.californium.elements.util.DatagramWriter writer)
Adds binary encoding of this extension's data.
|
static ConnectionIdExtension |
fromConnectionId(ConnectionId cid)
Create connection id extension from connection id.
|
static ConnectionIdExtension |
fromExtensionDataReader(org.eclipse.californium.elements.util.DatagramReader extensionDataReader,
InetSocketAddress peerAddress)
Create connection id extension from extensions data bytes.
|
ConnectionId |
getConnectionId()
Get connection id.
|
int |
getLength()
Gets the overall length of this extension's corresponding Extension struct.
|
fromExtensionDataReader, toByteArray, toStringpublic ConnectionId getConnectionId()
public int getLength()
HelloExtensionNote that this includes the 2 bytes indicating the extension type.
getLength in class HelloExtensionprotected void addExtensionData(org.eclipse.californium.elements.util.DatagramWriter writer)
HelloExtensionThis implementation does not do anything. Sub-classes should override this method and use the passed-in writer to add their extension_data bytes to the Extension data structure.
NB: Subclasses MUST NOT write the extension's type code to the writer
as this will already have been done by the HelloExtension.toByteArray() method.
addExtensionData in class HelloExtensionwriter - the writer to use for serializationpublic static ConnectionIdExtension fromConnectionId(ConnectionId cid)
cid - connection idNullPointerException - if cid is nullpublic static ConnectionIdExtension fromExtensionDataReader(org.eclipse.californium.elements.util.DatagramReader extensionDataReader, InetSocketAddress peerAddress) throws HandshakeException
extensionDataReader - extension data bytespeerAddress - peer addressNullPointerException - if extensionData is nullHandshakeException - if the extension data could not be decodedCopyright © 2023 Eclipse Foundation. All rights reserved.