Contents · Forum Home · StreamSec Tools 4.1.5.363 documentation

methodtAbstractDatagramSocket.SendTo

function SendTo(const aBuf; aCount: Integer; const aTo: tSocketAddress; aErrorCode: PInteger = nil): Integer; virtual; abstract;
Sends aCount octets to aTo as ONE datagram.
= aCount sent - handed to the system whole.
< 0 and aErrorCode^ = 0 WOULD BLOCK: the send buffer is full, and nothing was sent. A datagram protocol normally just drops it.
< 0 and aErrorCode^ <> 0 not sent: cDatagramClosed or a system error (too large for the path, unreachable, a family aTo does not match). The socket stays open. With aErrorCode = nil the errors raise EstSocketError; a would-block does not.