public final class ConnectionIdExtension extends HelloExtension
See draft-ietf-tls-dtls-connection-id for additional details.
HelloExtension.ExtensionType
LENGTH_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)
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, toString
public ConnectionId getConnectionId()
public int getLength()
HelloExtension
Note that this includes the 2 bytes indicating the extension type.
getLength
in class HelloExtension
protected void addExtensionData(org.eclipse.californium.elements.util.DatagramWriter writer)
HelloExtension
Note: 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 HelloExtension
writer
- the writer to use for serializationpublic static ConnectionIdExtension fromConnectionId(ConnectionId cid)
cid
- connection idNullPointerException
- if cid is null
public static ConnectionIdExtension fromExtensionDataReader(org.eclipse.californium.elements.util.DatagramReader extensionDataReader) throws HandshakeException
extensionDataReader
- extension data bytesNullPointerException
- if extensionData is null
HandshakeException
- if the extension data could not be decodedCopyright © 2021 Eclipse Foundation. All rights reserved.