DtlsConnectionId.create

DtlsConnectionId create(ubyte[] id) static @safe pure nothrow @nogc

Creates a Connection ID from raw bytes.

Ownership: the struct stores a reference to id, not a copy (@nogc forbids duplicating). The caller must not mutate the buffer afterwards; doing so silently changes the CID and corrupts any associative array keyed on it. Pass an immutable-forever buffer.

Parameters

idConnection identifier bytes (0-255 bytes; longer inputs are a programming error and assert).

Returns

A DtlsConnectionId wrapping the given bytes.