@qualithm/mqtt-wire - v0.8.0
    Preparing search index...

    Type Alias HookContext

    What the wire passes a packet hook beside the packet.

    type HookContext = {
        signal: AbortSignal;
    }
    Index

    Properties

    Properties

    signal: AbortSignal

    Aborts when the session ends, however it ends (reset() included), while the wire is waiting on the hook to answer: onConnect, onSubscribe, onUnsubscribe, and onPublish for a QoS 1 message under pubackAfterDelivery. Pass it to the hook's own I/O. Whatever a hook returns or throws after it aborts is discarded: no acknowledgement is sent for it. For a delivery the wire doesn't wait on (QoS 0, or a message it has already acknowledged) it never aborts, since the client won't resend it.