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

Function uri

packages/engine.io-client/lib/transports/websocket.ts:137–152  ·  view source on GitHub ↗

* Generates uri for connection. * * @private

()

Source from the content-addressed store, hash-verified

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
155const WebSocketCtor = globalThis.WebSocket || globalThis.MozWebSocket;

Callers

nothing calls this directly

Calls 2

randomStringFunction · 0.90
createUriMethod · 0.80

Tested by

no test coverage detected