* Connect to a pipe server (UDS or TCP). * When tcpEndpoint was provided in constructor, connects over TCP. * Otherwise uses UDS with retry for socket file existence.
(timeoutMs: number = 5000)
| 377 | * Otherwise uses UDS with retry for socket file existence. |
| 378 | */ |
| 379 | async connect(timeoutMs: number = 5000): Promise<void> { |
| 380 | if (this.tcpEndpoint) { |
| 381 | return this.connectTcp(timeoutMs) |
| 382 | } |
| 383 | return this.connectUds(timeoutMs) |
| 384 | } |
| 385 | |
| 386 | private async connectTcp(timeoutMs: number): Promise<void> { |
| 387 | const { host, port } = this.tcpEndpoint! |
no test coverage detected