- SendResult.OK — all bytes accepted (sent to OS or queued)
- SendResult.PRESSURE — zero bytes queued, budget exceeded
- SendResult.CLOSED — not a write end or not in OPEN state
- SendResult.ERROR — system error, check errno
Pipe.write
SendResult write(scope const(ubyte)[] data) @trustedWrite bytes to the pipe (write end only).
data is copied (TERMINOLOGY.md) into the internal send queue. The caller may reuse the buffer immediately.
Backpressure: returns SendResult.PRESSURE when the internal queue would exceed the configured highWaterMark or the global EventLoop send queue limit. The caller must wait for onWritable before retrying.
Parameters
data | Bytes to write. |