Contents · Forum Home · StreamSec Tools 4.1.5.363 documentation

methodtAbstractDatagramSocket.SendSegmentsTo

function SendSegmentsTo(const aBuf; aCount, aSegmentSize: Integer; const aTo: tSocketAddress; aErrorCode: PInteger = nil): Integer; virtual;
Sends aCount octets to aTo as consecutive datagrams of aSegmentSize octets, the last one possibly shorter. The result is the number of whole datagrams the system accepted, always the first ones; aErrorCode^ describes the first one it did not accept, with SendTo's meanings (0 for a full send buffer). With aErrorCode = nil such an error raises, as in SendTo. Invalid sizes raise EstSocketError and send nothing. The default sends one datagram at a time and stops at the first that fails; the Windows socket hands two or more to the system in one call where it supports UDP segmentation offload.