edgeport - v1.0.3
    Preparing search index...

    Interface MqttTransport

    A transport-agnostic packet pipe used by the MQTT session.

    Both the TCP (CoreSocket) and WebSocket transports implement this so the session encodes and decodes the same control packets over either. readPacket resolves the next complete packet or null at end of stream; writePacket sends one already-encoded packet.

    1.0.0

    interface MqttTransport {
        close(): Promise<void>;
        readPacket(): Promise<DecodedPacket | null>;
        writePacket(bytes: Uint8Array): Promise<void>;
    }
    Index
    • Closes the underlying transport.

      Returns Promise<void>

    • Sends one encoded control packet.

      Parameters

      • bytes: Uint8Array

      Returns Promise<void>