* Open a websocket against the request path.
(requestPath: string, options?: Websocket.ClientOptions)
| 76 | * Open a websocket against the request path. |
| 77 | */ |
| 78 | public ws(requestPath: string, options?: Websocket.ClientOptions): Websocket { |
| 79 | const address = ensureAddress(this.hs, "ws") |
| 80 | if (typeof address === "string") { |
| 81 | throw new Error("Cannot open websocket to socket path") |
| 82 | } |
| 83 | address.pathname = requestPath |
| 84 | |
| 85 | return new Websocket(address.toString(), options) |
| 86 | } |
| 87 | |
| 88 | /** |
| 89 | * Open a websocket and wait for it to fully open. |
no test coverage detected