- SendResult.OK — all bytes accepted (sent to OS or queued)
- SendResult.PRESSURE — zero bytes queued, budget exceeded
- SendResult.CLOSED — connection not in CONNECTED state
- SendResult.ERROR — system error, check errno
UnixConnection.send
SendResult 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 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 send. |