Contents · Forum Home · StreamSec Tools 4.1.5.363 documentation

methodtQuicClient.QueueSend

procedure QueueSend(aStreamID: UInt64; const aData: TBytes; aFin: Boolean); overload;
QueueSend of the whole of aData; see the overload below.
procedure QueueSend(aStreamID: UInt64; const aData: TBytes; aDataOffset, aCount: Integer; aFin: Boolean); overload;
Queues aCount bytes of aData from aDataOffset on aStreamID, and ends the send direction when aFin is True (aCount 0 with aFin True only ends it); Flush sends them. All or nothing: if flow-control credit or the send buffer cannot take every byte, it raises eQuicError and queues nothing. Check Dispatcher.Streams.SendCapacity(aStreamID) first; room grows as the server acknowledges data and grants credit. The client may keep the whole aData array, charged to the send buffer, until it is acknowledged: never change its elements afterwards (a new array per call is fine). Only with aMaxSendBytes 0 in Create: if the output queue is already full (unsent data on more than 256 streams, or ranges split by loss), the call raises after queueing and the connection closes. A positive aMaxSendBytes sizes the queue so that this cannot happen.