Topic Path: Symbol Reference > Classes > TIdStackDotNet Class > TIdStackDotNet Methods > Send Method
ContentsIndexHome
PreviousUpNext
TIdStackDotNet.Send Method

Sends data on a connected socket handle.

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.

Copyright 1993-2006, Chad Z. Hower (aka Kudzu) and the Indy Pit Crew. All rights reserved.
Post feedback to the Indy Docs Newsgroup.