kkrpc
    Preparing search index...

    Interface Platform<TWire>

    Wire-level runtime primitive used by createTransport().

    interface Platform<TWire> {
        capabilities?: PlatformCapabilities;
        close(): void;
        onClose(listener: (reason?: Error) => void): () => void;
        send(wire: TWire, transfers?: Transferable[]): void | Promise<void>;
        subscribe(listener: (wire: TWire) => void): () => void;
    }

    Type Parameters

    • TWire
    Index

    Properties

    capabilities?: PlatformCapabilities

    Optional platform capabilities forwarded into the composed transport.

    Methods

    • Optional connection-close notification; forwarded into the composed transport's onClose. Same contract as Transport.onClose.

      Parameters

      • listener: (reason?: Error) => void

      Returns () => void