SendQueue.front

const(ubyte)[] front() const @trusted nothrow @nogc

Get a contiguous view of the front of the queue for writing to a socket or pipe.

When the queue wraps around (ring-buffer mode), only the tail-to-end segment is returned. Call front() again after consume()-ing that segment to get the wrapped remainder.

The returned slice is Borrowed (TERMINOLOGY.md): valid only until the next append() or consume() call.

Returns

A const(ubyte)[] slice of contiguous front data, or null when

the queue is empty.