procxy / PassableHandle
Type Alias: PassableHandle
ts
type PassableHandle = Socket | Server | Socket | number;Defined in: src/types/procxy.ts:507
Union of OS-level handle types that can be transferred to the child process via $sendHandle.
Remarks
Handles are transferred, not cloned. Once sent, the parent process loses ownership: using the handle in the parent after calling $sendHandle() results in undefined behavior.
Supported types:
net.Socket— TCP or IPC stream socketnet.Server— TCP or IPC server (passes the listening descriptor)dgram.Socket— UDP datagram socketnumber— raw POSIX file descriptor (Unix only)
Platform notes:
- Full support on Linux and macOS via
SCM_RIGHTS(Unix domain socket ancillary data) - Limited support on Windows;
net.Sockettransfer works butdgram.Socketand raw fd do not
Handle passing requires supportHandles: true in ProcxyOptions andserialization: 'advanced'. A warning is logged when supportHandles: true is set on Windows.
See
Procxy — proxy type whose $sendHandle method accepts this type