(uri, opts)
| 49 | #shouldReconnect = true; |
| 50 | |
| 51 | constructor(uri, opts) { |
| 52 | super(); |
| 53 | this.#uri = uri; |
| 54 | this.#opts = Object.assign( |
| 55 | { |
| 56 | path: "/socket.io/", |
| 57 | reconnectionDelay: 2000, |
| 58 | }, |
| 59 | opts |
| 60 | ); |
| 61 | this.#open(); |
| 62 | } |
| 63 | |
| 64 | #open() { |
| 65 | this.#ws = new WebSocket(this.#createUrl()); |