EndPoint
Extends EventEmitter
Common functionality for all end point handlers
Table of Contents
- Methods
Methods
close
()
Closes the end point and stops listening for events.
This method no longer needs to be explicitly called as end points are now automatically closed when the last event listener is removed.
open
()
Opens this end point and starts listening for events.
This method no longer needs to be explicitly called as end points are now automatically opened when the first event listener is attached.
Use this method to keep the end point open even when no event listeners are attached.
untilOpen
()
Promise
Returns a promise that will be resolved when this end point is opened
Returns:
Promise
Example:
let C = new CantabileApi();
C.application.open();
await C.application.untilOpen();