Pipe
uv_pipe_t.Pipe
#include <icy/pipe.h>Inherits:
Stream< uv_pipe_t >
Named pipe / stdio stream built on uv_pipe_t.
Suitable for inter-process communication and for wrapping process stdio (stdin/stdout/stderr). IPC mode allows passing stream handles between processes over the pipe.
Public Methods
| Return | Name | Description |
|---|---|---|
Pipe | Construct a [Pipe](#pipe) bound to loop without initializing the libuv handle. | |
~Pipe virtual | Destroy the pipe, stopping reads and closing the handle. | |
void | init virtual | Initialize the underlying uv_pipe_t handle. |
bool | readStart virtual | Start reading from the pipe. |
Pipe
Pipe(uv::Loop * loop)Construct a [Pipe](#pipe) bound to loop without initializing the libuv handle.
Call [init()](#init-3) before performing any I/O.
Parameters
loopEvent loop to associate with. Defaults to the process-wide default loop.
~Pipe
virtual
virtual ~Pipe()Destroy the pipe, stopping reads and closing the handle.
init
virtual
virtual void init(bool ipc)Initialize the underlying uv_pipe_t handle.
Must be called before [readStart()](#readstart) or any write operations.
Parameters
ipcSet totrueto enable IPC mode, which allows sending and receiving stream handles alongside data via[write()](icy-Stream.html#write-16).
readStart
virtual
virtual bool readStart()Start reading from the pipe.
Delegates to [Stream](icy-Stream.html#stream)<uv_pipe_t>::[readStart()](#readstart). Emits the Read signal as data arrives.
Returns
true if uv_read_start was called successfully.
