@gibme/ssh
    Preparing search index...

    Class StreamController

    Hierarchy

    • EventEmitter
      • StreamController
    Index

    Constructors

    Accessors

    Methods

    Constructors

    Accessors

    • get done(): boolean

      Returns boolean

    Methods

    • Returns void

    • Alias for emitter.removeListener().

      Parameters

      • event: "data"
      • listener: (data: Buffer) => void

      Returns this

      v10.0.0

    • Parameters

      • event: "completed"
      • listener: () => void

      Returns this

    • Parameters

      • event: "cancelled"
      • listener: () => void

      Returns this

    • Adds the listener function to the end of the listeners array for the event named eventName. No checks are made to see if the listener has already been added. Multiple calls passing the same combination of eventName and listener will result in the listener being added, and called, multiple times.

      server.on('connection', (stream) => {
      console.log('someone connected!');
      });

      Returns a reference to the EventEmitter, so that calls can be chained.

      By default, event listeners are invoked in the order they are added. The emitter.prependListener() method can be used as an alternative to add the event listener to the beginning of the listeners array.

      import { EventEmitter } from 'node:events';
      const myEE = new EventEmitter();
      myEE.on('foo', () => console.log('a'));
      myEE.prependListener('foo', () => console.log('b'));
      myEE.emit('foo');
      // Prints:
      // b
      // a

      Parameters

      • event: "data"
      • listener: (data: Buffer) => void

        The callback function

      Returns this

      v0.1.101

    • Parameters

      • event: "completed"
      • listener: () => void

      Returns this

    • Parameters

      • event: "cancelled"
      • listener: () => void

      Returns this

    • Adds a one-time listener function for the event named eventName. The next time eventName is triggered, this listener is removed and then invoked.

      server.once('connection', (stream) => {
      console.log('Ah, we have our first user!');
      });

      Returns a reference to the EventEmitter, so that calls can be chained.

      By default, event listeners are invoked in the order they are added. The emitter.prependOnceListener() method can be used as an alternative to add the event listener to the beginning of the listeners array.

      import { EventEmitter } from 'node:events';
      const myEE = new EventEmitter();
      myEE.once('foo', () => console.log('a'));
      myEE.prependOnceListener('foo', () => console.log('b'));
      myEE.emit('foo');
      // Prints:
      // b
      // a

      Parameters

      • event: "data"
      • listener: (data: Buffer) => void

        The callback function

      Returns this

      v0.3.0

    • Parameters

      • event: "completed"
      • listener: () => void

      Returns this

    • Parameters

      • event: "cancelled"
      • listener: () => void

      Returns this