NativeDtlsEngine.sendAlert

TlsProgress sendAlert(DtlsPeerState state, AlertLevel level, AlertDescription description) @safe

Build and send a DTLS alert record to a peer.

If the peer has active write AEAD keys, the alert is encrypted. Otherwise it is sent in the clear (epoch 0).

Parameters

stateThe peer state.
levelThe alert level (WARNING or FATAL).
descriptionThe alert description code.

Returns

TlsProgress.DONE if sent, TlsProgress.ERROR on failure.