in src/SignalingClient.ts [110:121]
public open(): void {
if (this.readyState !== ReadyState.CLOSED) {
throw new Error('Client is already open, opening, or closing');
}
this.readyState = ReadyState.CONNECTING;
// The process of opening the connection is asynchronous via promises, but the interaction model is to handle asynchronous actions via events.
// Therefore, we just kick off the asynchronous process and then return and let it fire events.
this.asyncOpen()
.then()
.catch(err => this.onError(err));
}