Base implementation of the extensible Session class

interface Session<S> {
    connection: default<S>;
    isConnected: boolean;
    close(): boolean;
    popTimeout(): number;
    pushTimeout(timeout: number): void;
}

Type Parameters

  • S extends Duplex = Duplex

Properties

connection: default<S>

Current connection to interact with the device

isConnected: boolean

Is current [connection]Session.connection active

Methods

  • Change the current timeout keeping the previous value

    Parameters

    • timeout: number

    Returns void