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

Method createSocket

packages/engine.io-client/lib/transports/websocket.ts:167–177  ·  view source on GitHub ↗
(
    uri: string,
    protocols: string | string[] | undefined,
    opts: Record<string, any>,
  )

Source from the content-addressed store, hash-verified

165 */
166export class WS extends BaseWS {
167 createSocket(
168 uri: string,
169 protocols: string | string[] | undefined,
170 opts: Record<string, any>,
171 ) {
172 return !isReactNative
173 ? protocols
174 ? new WebSocketCtor(uri, protocols)
175 : new WebSocketCtor(uri)
176 : new WebSocketCtor(uri, protocols, opts);
177 }
178
179 doWrite(_packet: Packet, data: RawData) {
180 this.ws.send(data);

Callers 1

doOpenFunction · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected