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

Function createClient

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

Source from the content-addressed store, hash-verified

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

Callers 8

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
index.jsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected