Documentation
    Preparing search index...

    Interface SerialServiceOptions

    Options for createSerialService.

    interface SerialServiceOptions {
        close?: (
            sessionId: string,
            reason: string | undefined,
            context: SerialServiceContext,
        ) => void | Promise<void>;
        destroyWindow?: (windowId: string) => void;
        open?: (
            request: SerialOpenRequest,
            context: SerialServiceContext,
        ) => SerialOpenResult | Promise<SerialOpenResult>;
        write?: (
            sessionId: string,
            data: readonly number[],
            context: SerialServiceContext,
        ) => void | Promise<void>;
    }
    Index

    Properties

    close?: (
        sessionId: string,
        reason: string | undefined,
        context: SerialServiceContext,
    ) => void | Promise<void>

    Host-owned serial close hook.

    destroyWindow?: (windowId: string) => void

    Optional host cleanup when a napplet window is destroyed.

    open?: (
        request: SerialOpenRequest,
        context: SerialServiceContext,
    ) => SerialOpenResult | Promise<SerialOpenResult>

    Host-owned serial open hook.

    write?: (
        sessionId: string,
        data: readonly number[],
        context: SerialServiceContext,
    ) => void | Promise<void>

    Host-owned serial write hook.