NativeDtlsEngine.handleAlertRecord

private void handleAlertRecord(DtlsPeerState state, ref DtlsRecord rec) @safe

Handle a received ALERT record for a connected peer.

Decrypts the alert if encrypted, then processes it:

  • close_notify: marks peer as having received close_notify and

sends a responding close_notify if we haven't already.

  • FATAL alerts: marks the peer as disconnected.

Parameters

stateThe connected peer state.
recThe received DTLS record containing the alert.