MCPcopy
hub / github.com/socketio/socket.io / constructor

Method constructor

examples/basic-websocket-client/src/index.js:51–62  ·  view source on GitHub ↗
(uri, opts)

Source from the content-addressed store, hash-verified

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());

Callers

nothing calls this directly

Calls 1

#openMethod · 0.95

Tested by

no test coverage detected