- success — all bytes accepted (sent to OS or queued)
- SendErrorReason.PRESSURE — zero bytes queued, budget exceeded
- SendErrorReason.CLOSED — connection not in CONNECTED state
- SendErrorReason.ERROR — system error;
errnocarries the code
UnixConnection.send
SendStatus send(scope const(ubyte)[] data) @trustedSend bytes over the connection.
Data is copied into an internal send queue. The caller may reuse or free the buffer immediately after this method returns.
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 send. |