- success — all bytes accepted (sent to OS or queued)
- SendErrorReason.PRESSURE — zero bytes queued, budget exceeded
- SendErrorReason.CLOSED — not a write end or not in OPEN state
- SendErrorReason.ERROR — system error;
errnocarries the code
Pipe.write
SendStatus 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 a SendError with reason SendErrorReason.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. |