Internet Direct (Indy) Version 9.0.1 Beta
|
procedure SendTo(const AIP: string; const APort: Integer; var ABuffer; const ABufferSize: Integer);
SendTo will raise an EIdException exception if the number of bytes sent does not match the value in ABufferSize, or if the number of bytes sent is Id_SOCKET_ERROR.
SendTo is used on datagram or stream sockets. For datagram sockets, care must be taken not to exceed the maximum packet size of the protocol stack declared in MAXUDPDG. Streaming sockets will attempt to write all data in the buffer to the socket connection.
To send a broadcast datagram, the IP address parameter must contain Id_INADDR_ANY.