effect-io-ai

Package: @effect/platform-node-shared
Module: NodeSocket

NodeSocket.makeNet

Opens a Node TCP connection as an Effect socket.

When to use

Use to create a scoped Socket.Socket from Node net.createConnection.

Details

Supports openTimeout and closes or destroys the underlying socket when the enclosing scope is finalized.

Signature

declare const makeNet: (options: Net.NetConnectOpts & { readonly openTimeout?: Duration.Input | undefined; }) => Effect.Effect<Socket.Socket>

Source

Since v4.0.0