emitter.once(eventName, listener)
Adds a one time listener
function for the event named eventName
. This listener is invoked only the next time eventName
is triggered, after which it is removed.
1 2 3 | server.once( 'connection' , (stream) => { console.log( 'Ah, we have our first user!' ); }); |
Returns a reference to the EventEmitter
so calls can be chained.
Please login to continue.