DtlsRecordLayer.buildRecord

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

Build a DTLS record for sending.

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

Parameters

typeContent type.
payloadRecord payload (may be encrypted).

Returns

Serialized DTLS record bytes.