Initiate close from the client side.
()
| 177 | |
| 178 | /** Initiate close from the client side. */ |
| 179 | async close(): Promise<void> { |
| 180 | if (!this.ws || this._closed) return; |
| 181 | this.ws.close(); |
| 182 | await this.closed(); |
| 183 | } |
| 184 | |
| 185 | private _onMessage(data: unknown): void { |
| 186 | let frame: AnyFrame; |