Internet Direct (Indy)
Home
PreviousUpNext
TIdStackDotNet.Send Method

Sends data on a connected socket handle.

Pascal
function Send(
    ASocket: TIdStackSocketHandle; 
    const ABuffer: TIdBytes; 
    AOffset: Integer = 0; 
    ASize: Integer = -1
): Integer; override;
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.
 
ASize 
Number of bytes in the buffer. 

Integer - Number of bytes written to the socket handle.

Send is an overridden Integer function that implements the method used to access the Send() API for the protocol stack implementation. 

Send is used to write the data in ABuffer to a remote system using the socket handle in ASocket. AOffset is the initial position in ABuffer for values written to the socket handle. 

The return value for the method is the number of bytes sent using the connected socket handle. 

The remote network must be connected prior to calling Send. 

Exceptions occuring in the method are re-raised using either the EIdSocketError or EIdWrapperException exception types.

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.