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

Method onopen

packages/socket.io-client/lib/socket.ts:617–626  ·  view source on GitHub ↗

* Called upon engine `open`. * * @private

()

Source from the content-addressed store, hash-verified

615 * @private
616 */
617 private onopen(): void {
618 debug("transport is open - connecting");
619 if (typeof this.auth == "function") {
620 this.auth((data) => {
621 this._sendConnectPacket(data as Record<string, unknown>);
622 });
623 } else {
624 this._sendConnectPacket(this.auth);
625 }
626 }
627
628 /**
629 * Sends a CONNECT packet to initiate the Socket.IO session.

Callers 1

connectMethod · 0.95

Calls 2

_sendConnectPacketMethod · 0.95
debugFunction · 0.85

Tested by

no test coverage detected