Base implementation of the extensible Session class

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

Type Parameters

  • S extends Duplex = Duplex

Implemented by

    Properties

    connection: Connection<S>

    Current connection to interact with the device

    isConnected: boolean

    Is current [connection]Session.connection active

    Methods

    • Close current connection

      Returns boolean

    • Restore previous timeout value

      Returns number

    • Change the current timeout keeping the previous value

      Parameters

      • timeout: number

      Returns void