* Called upon engine `open`. * * @private
()
| 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. |
no test coverage detected