TcpConnection.send

SendStatus send(scope const(ubyte)[] data) @trusted

Send 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

dataBytes to send.

Returns