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

Function createClient

packages/socket.io/test/support/util.ts:36–46  ·  view source on GitHub ↗
(
  io: Server,
  nsp: string = "/",
  opts?: Partial<ManagerOptions & SocketOptions>,
)

Source from the content-addressed store, hash-verified

34};
35
36export function createClient<
37 CTS extends EventsMap = DefaultEventsMap,
38 STC extends EventsMap = DefaultEventsMap,
39>(
40 io: Server,
41 nsp: string = "/",
42 opts?: Partial<ManagerOptions & SocketOptions>,
43): ClientSocket<STC, CTS> {
44 const port = (io.httpServer.address() as AddressInfo).port;
45 return ioc(`http://localhost:${port}${nsp}`, opts);
46}
47
48export function success(
49 done: Function,

Callers 11

messaging-many.tsFile · 0.90
close.tsFile · 0.90
socket.tsFile · 0.90
middleware.tsFile · 0.90
socket-timeout.tsFile · 0.90
namespaces.tsFile · 0.90
initRedisClientFunction · 0.85
redis.tsFile · 0.85
initServerFunction · 0.85
index.jsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…