Internet Direct (Indy)
Home
PreviousUpNext
TIdStack.SendTo Method

Sends data to a specific destination using the socket handle.

Pascal
function SendTo(
    ASocket: TIdStackSocketHandle; 
    const ABuffer: TIdBytes; 
    const AOffset: Integer; 
    const AIP: string; 
    const APort: integer; 
    const AIPVersion: TIdIPVersion = ID_DEFAULT_IP_VERSION
): Integer; virtual; abstract;
Parameters 
Description 
ASocket 
Socket handle for the operation.
 
ABuffer 
Values to be sent on the socket handle.
 
AOffset 
Offset into the buffer to locate values to send.
 
AIP 
IP address for the remote destination.
 
APort 
Port number for the remote destination.
 
AIPVersion 
IP address family for the IP address. 

Integer - Number of bytes written to the socket handle.

SendTo is an abstract virtual Integer function that specifes the method used to access the SendTo() API for a protocol stack implementation. 

SendTo is used to write the outgoing data in ABuffer on the socket handle in ASocket. SendTo uses the IP address and port numer in AIP and APort as the destination for the transmission. 

SendTo is normally used on a datagram socket, but can also override the current remote network destination for a streaming socket. 

Use Send to transmit data using a specified socket after the connection to the remote system has been established.

Internet Direct (Indy) version 10.1.5
Copyright © 1993-2006, Chad Z. Hower (aka Kudzu) and the Indy Pit Crew. All rights reserved.
Website http://www.indyproject.org.
Post feedback to the Indy Documentation newsgroup.