tcpConnect
function tcpConnect( host, port, options?): RpcClient;Defined in: src/client/tcp.ts:35
Connect to a vgi-rpc server over a raw TCP socket and wrap it with
pipeConnect. The network analog of subprocessConnect: identical
lockstep raw Arrow-IPC framing, only the transport differs. Nagle’s
algorithm is disabled (setNoDelay(true)) so lockstep requests are not
delayed coalescing writes. The returned client’s RpcClient.close
also destroys the socket.
SECURITY: raw TCP carries no authentication or TLS — only connect to
trusted endpoints. Use httpConnect for untrusted networks.
Parameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
host |
string |
Hostname or IP address of the TCP server. |
port |
number |
TCP port of the server. |
options? |
TcpConnectOptions |
Optional log/external-location configuration. |
