* Generates uri for connection. * * @private
()
| 135 | * @private |
| 136 | */ |
| 137 | private uri() { |
| 138 | const schema = this.opts.secure ? "wss" : "ws"; |
| 139 | const query: { b64?: number } = this.query || {}; |
| 140 | |
| 141 | // append timestamp to URI |
| 142 | if (this.opts.timestampRequests) { |
| 143 | query[this.opts.timestampParam] = randomString(); |
| 144 | } |
| 145 | |
| 146 | // communicate binary support capabilities |
| 147 | if (!this.supportsBinary) { |
| 148 | query.b64 = 1; |
| 149 | } |
| 150 | |
| 151 | return this.createUri(schema, query); |
| 152 | } |
| 153 | } |
| 154 | |
| 155 | const WebSocketCtor = globalThis.WebSocket || globalThis.MozWebSocket; |
nothing calls this directly
no test coverage detected