Topics   All   Mac OS X (Only)   Windows (Only)   Linux (Only, Not)   iOS (Only, Not)  
Components   Crossplatform Mac & Win   Server (Not)   Client   Old   Guides   Examples
New in version: 6.1   6.2   6.3   6.4   6.5   7.0   7.1   7.2   7.3   7.4    Statistic  

CURL.SendData

Sends raw data over a connection.

Component Version macOS Windows Server FileMaker Cloud FileMaker iOS SDK
CURL 7.2 Yes Yes Yes Yes Yes

MBS( "CURL.SendData"; Handle; Data { ; DataType } )

Parameters

Parameter Description Example value
Handle The CURL session handle. $curl
Data The data to send.
Can be hex or base64 encoded text.
DataType Optional
The data type to send.
Can be Hex or Base64. Default is hex.
"hex"

Result

Returns OK or error.

Description

Sends raw data over a connection.
This function sends arbitrary data over the established connection. You may use it together with ReceiveData to implement custom protocols using libcurl. This functionality can be particularly useful if you use proxies and/or SSL encryption: libcurl will take care of proxy negotiation and connection set-up.

Provide the data to send via parameter. We return the number of bytes sent.

To establish the connection, use CURL.SetOptionConnectOnly with value 1 before calling CURL.Perform function. Note that SendData will not work on connections that were created without this option.

The call will return empty and set error to CURLE_AGAIN (81) if it's not possible to send data right now - the socket is used in non-blocking mode internally. When CURLE_AGAIN is returned, please wait.

Furthermore if you wait on the socket and it tells you it's writable, SendData may return CURLE_AGAIN if the only data that was sent was for internal SSL processing, and no other data could be sent.

Please use CURL.ErrorCode to query error after you used this function.

See also


CURL.SSLVersion   -   CURL.SendText

Feedback: Report problem or ask question.




Links
MBS Xojo Chart Plugins