Internet Direct (Indy)
Home
PreviousUpNext
TIdSocketHandle.RecvFrom Method

Reads data from the socket handle connected to specific remote computer system.

Pascal
function RecvFrom(
    var ABuffer: TIdBytes; 
    var VIP: string; 
    var VPort: Integer; 
    const AIPVersion: TIdIPVersion = ID_DEFAULT_IP_VERSION
): Integer;
Parameters 
Description 
ABuffer 
Buffer used to store values read from the socket handle.
 
VIP 
IP Address for the remote connection.
 
VPort 
Port number for the remote connection.
 
AIPVersion 
IP address family for the datagram transmission. Default value is ID_DEFAULT_IP_VERSION

Integer - Number of bytes read from the socket handle.

RecvFrom is an Integer function used to read data from the socket handle for the connection using the remote IP and Port specified in VIP and VPort. Data read from the socket handle is stored in the buffer indicated by ABuffer. 

RecvFrom uses GStack to access the ReceiveFrom API for the protocol stack using the socket handle for connection. RecvFrom captures the IP address and port number from which the data was sent. 

The return value for the method is the number of bytes read from the socket handle and the IP and Port numbers indicated in VIP and VPort. 

Use Receive to read data from the socket handle for the connection. 

Use Send or SendTo to write data using the socket handle for the connection.

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.