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

Method bind

packages/socket.io/lib/index.ts:725–731  ·  packages/socket.io/lib/index.ts::Server.bind

* Binds socket.io to an engine.io instance. * * @param engine engine.io (or compatible) server * @return self

(engine: any)

Source from the content-addressed store, hash-verified

723 * @return self
724 */
725 public bind(engine: any): this {
726 class="cm">// TODO apply strict types to the engine: class="st">"connection" event, `close()` and a method to serve static content
727 class="cm">// this would allow to provide any custom engine, like one based on Deno or Bun built-in HTTP server
728 this.engine = engine;
729 this.engine.on(class="st">"connection", this.onconnection.bind(this));
730 return this;
731 }
732
733 /**
734 * Called with each incoming transport connection.

Callers 15

attachAppMethod · 0.95
initEngineMethod · 0.95
initServerFunction · 0.95
setTransportMethod · 0.80
installTimerFunctionsFunction · 0.80
doPollFunction · 0.80
setTransportMethod · 0.80
closeTransportMethod · 0.80
attachMethod · 0.80
attachMethod · 0.80
constructorMethod · 0.80
subEventsMethod · 0.80

Calls 1

onMethod · 0.45

Tested by

no test coverage detected