DtlsRecordLayer.buildRecord

ubyte[] buildRecord(ContentType type, const(ubyte)[] payload, ushort epoch) @safe pure nothrow

Build a DTLS record for sending.

Creates a complete DTLS record with the appropriate header, using the current epoch and auto-incrementing sequence number.

Parameters

typeContent type.
payloadRecord payload (may be encrypted).
epochEpoch for this record.

Returns

Serialized DTLS record bytes.