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

Method onconnection

packages/socket.io/lib/index.ts:740–749  ·  view source on GitHub ↗

* Called with each incoming transport connection. * * @param {engine.Socket} conn * @return self * @private

(conn: RawSocket)

Source from the content-addressed store, hash-verified

738 * @private
739 */
740 private onconnection(conn: RawSocket): this {
741 // @ts-expect-error use of private
742 debug("incoming connection with id %s", conn.id);
743 const client = new Client(this, conn);
744 if (conn.protocol === 3) {
745 // @ts-expect-error use of private
746 client.connect("/");
747 }
748 return this;
749 }
750
751 /**
752 * Looks up a namespace.

Callers

nothing calls this directly

Calls 2

connectMethod · 0.95
debugFunction · 0.85

Tested by

no test coverage detected