openmixer — generated API reference
    Preparing search index...

    Fire-and-forget UDP sender plus an inbound message pump. Owns one bound socket for the connection's lifetime; all datagrams go to host:port.

    Index
    • get isOpen(): boolean

      True once open has bound a socket and before close.

      Returns boolean

    • Close the socket and drop the reference. Idempotent.

      Returns Promise<void>

    • Create and bind the socket, wiring the message/error listeners. Idempotent.

      onMessage is a convenience for callers that register the handler at open time rather than up front; passing it is the same as calling setMessageHandler first.

      An error raised BEFORE the bind completes (EADDRINUSE, a permission denial) rejects the open — a caller must not be left awaiting a socket that will never bind. Errors after the bind are transport-level noise (the ICMP port-unreachable a silent desk generates) and go to the setErrorHandler sink, which is optional precisely so an adapter can ignore them.

      Parameters

      • OptionalonMessage: (msg: Buffer) => void

      Returns Promise<void>

    • Send one packet to the desk. Resolves once the OS accepts the datagram (fire-and-forget: a UDP control plane does not ACK).

      Parameters

      • packet: Uint8Array

      Returns Promise<void>

    • Register a transport-level error handler.

      Parameters

      • handler: (err: Error) => void

      Returns void

    • Register the inbound-datagram handler (replies + subscription pushes).

      Parameters

      • handler: (msg: Buffer) => void

      Returns void