Platforms to show: All Mac Windows Linux Cross-Platform
Back to CURLSMBS class.
CURLSMBS.SendData(data as Memoryblock) as Integer
| Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
| method | CURL | MBS CURL Plugin | 15.2 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
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, set OptionConnectOnly = true option before calling Perform methods. Note that SendData will not work on connections that were created without this option.
The call will return kError_AGAIN if it's not possible to send data right now - the socket is used in non-blocking mode internally. When kError_AGAIN is returned, please wait.
Furthermore if you wait on the socket and it tells you it's writable, SendData may return kError_AGAIN if the only data that was sent was for internal SSL processing, and no other data could be sent.
See also:
CURLSMBS.SendData(data as string) as Integer
| Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
| method | CURL | MBS CURL Plugin | 15.2 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
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, set OptionConnectOnly = true option before calling Perform methods. Note that SendData will not work on connections that were created without this option.
The call will return kError_AGAIN if it's not possible to send data right now - the socket is used in non-blocking mode internally. When kError_AGAIN is returned, please wait.
Furthermore if you wait on the socket and it tells you it's writable, SendData may return kError_AGAIN if the only data that was sent was for internal SSL processing, and no other data could be sent.
See also:
CURLSMBS.SetInputData(data as MemoryBlock)
| Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
| method | CURL | MBS CURL Plugin | 14.0 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
If you set input data, you do not need to use Read, RestartRead or Seek events.
The plugin will use the provided data for the upload.
Setting input data size, will also set the input file size (OptionInFileSizeLarge and OptionInFileSize).
Alternatively you can provide data in Read event or use OpenMTInputFile method to open a file on disk to upload.
See also:
CURLSMBS.SetInputData(data as string)
| Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
| method | CURL | MBS CURL Plugin | 14.0 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
If you set input data, you do not need to use Read, RestartRead or Seek events.
The plugin will use the provided data for the upload.
Setting input data size, will also set the input file size (OptionInFileSizeLarge and OptionInFileSize).
Alternatively you can provide data in Read event or use OpenMTInputFile method to open a file on disk to upload.
See also:
CURLSMBS.SetOptionConnectTo(list() as string)
| Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
| method | CURL | MBS CURL Plugin | 18.2 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
CURLSMBS.SetOptionEmptyPassword
| Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
| method | CURL | MBS CURL Plugin | 15.3 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
Normally you have no password unless you set it.
But if you set a password with empty string, the plugin sets CURL to use no password.
This method is to use an empty password.
CURLSMBS.SetOptionHTTP200Aliases(list() as string)
| Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
| method | CURL | MBS CURL Plugin | 9.8 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
Some servers respond with a custom header response line. For example, IceCast servers respond with "ICY 200 OK". By including this string in your list of aliases, the response will be treated as a valid HTTP header line such as "HTTP/1.0 200 OK".
The alias itself is not parsed for any version strings. So if your alias is "MYHTTP/9.9", LibCURL will not treat the server as responding with HTTP version 9.9. Instead LibCURL will use the value set by option HTTPVersion.
The Lasterror property is set. 0 for success.
CURLSMBS.SetOptionHTTPHeader(list() as string)
| Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
| method | CURL | MBS CURL Plugin | 9.8 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
If you add a header that is otherwise generated and used by libCURL internally, your added one will be used instead. If you add a header with no contents as in 'Accept:' (no data on the right side of the colon), the internally used header will get disabled. Thus, using this option you can add new headers, replace internal headers and remove internal headers. To add a header with no contents, make the contents be two quotes: "". The headers included in the linked list must not be CRLF-terminated, because CURL adds CRLF after each header item. Failure to comply with this will result in strange bugs because the server will most likely ignore part of the headers you specified.
The first line in a request (containing the method, usually a GET or POST) is not a header and cannot be replaced using this option. Only the lines following the request-line are headers. Adding this method line in this list of headers will only cause your request to send an invalid header.
Pass an empty array to this to reset back to no custom headers.
The Lasterror property is set. 0 for success.
Some examples using this method:
CURLSMBS.SetOptionMailRecipients(list() as string)
| Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
| method | CURL | MBS CURL Plugin | 11.0 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
Some examples using this method:
CURLSMBS.SetOptionPostQuote(list() as string)
| Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
| method | CURL | MBS CURL Plugin | 9.8 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
Disable this operation again by using an empty array for this option.
The Lasterror property is set. 0 for success.
If you want to do a ftp operation instead of download/upload/directory listing, please use SetOptionQuote.
Some examples using this method:
CURLSMBS.SetOptionPreQuote(list() as string)
| Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
| method | CURL | MBS CURL Plugin | 9.8 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
Disable this operation again by using an empty array for this option. Before version 7.15.6, if you also set Nobody to true, this option didn't work.
The Lasterror property is set. 0 for success.
CURLSMBS.SetOptionProxyHeader(list() as string)
| Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
| method | CURL | MBS CURL Plugin | 18.2 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
CURLSMBS.SetOptionQuote(list() as string)
| Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
| method | CURL | MBS CURL Plugin | 9.8 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
This will be done before any other FTP commands are issued (even before the CWD command).
Disable this operation again by using an empty array for this option.
The Lasterror property is set. 0 for success.
Some examples using this method:
CURLSMBS.SetOptionResolve(list() as string)
| Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
| method | CURL | MBS CURL Plugin | 18.2 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
CURLSMBS.SetOptionTelnetOptions(list() as string)
| Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
| method | CURL | MBS CURL Plugin | 9.8 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
The variables should be in the format <option=value>. libCURL supports the options 'TTYPE', 'XDISPLOC' and 'NEW_ENV'. See the TELNET standard for details.
The Lasterror property is set. 0 for success.
CURLSMBS.SetPathCAInfo(path as folderitem)
| Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
| method | CURL | MBS CURL Plugin | 10.0 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
This makes sense only when used in combination with the OptionSSLVerifyPeer option. If OptionSSLVerifyPeer is false, OptionCAINFO need not even indicate an accessible file.
Note that option is by default set to the system path where libCURL's cacert bundle is assumed to be stored, as established at build time.
The Lasterror property is set. 0 for success.
You can set this value and later you can read it, but you cannot read the default value.
CURLSMBS.SetPathCAPath(path as folderitem)
| Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
| method | CURL | MBS CURL Plugin | 10.0 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
The certificate directory must be prepared using the openssl c_rehash utility. This makes sense only when used in combination with the CURLOPT_SSL_VERIFYPEER option. If OptionSSLVerifyPeer is zero, OptionCAPath need not even indicate an accessible path. The OptionCAPath function apparently does not work in Windows due to some limitation in openssl. This option is OpenSSL-specific and does nothing if libCURL is built to use GnuTLS.
The Lasterror property is set. 0 for success.
You can set this value and later you can read it, but you cannot read the default value.
CURLSMBS.SetPathCRLFile(path as folderitem)
| Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
| method | CURL | MBS CURL Plugin | 10.0 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
When CURL is built to use NSS or GnuTLS, there is no way to influence the use of CRL passed to help in the verification process. When libCURL is built with OpenSSL support, X509_V_FLAG_CRL_CHECK and X509_V_FLAG_CRL_CHECK_ALL are both set, requiring CRL check against all the elements of the certificate chain if a CRL file is passed.
This option makes sense only when used in combination with the OptionSSLVerifyPeer option.
A specific error code (CURLE_SSL_CRL_BADFILE) is defined with the option. It is returned when the SSL exchange fails because the CRL file cannot be loaded. Note that a failure in certificate verification due to a revocation information found in the CRL does not trigger this specific error. (Added in 7.19.0)
CURLSMBS.SetPathIssuerCert(path as folderitem)
| Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
| method | CURL | MBS CURL Plugin | 10.0 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
If the option is set, an additional check against the peer certificate is performed to verify the issuer is indeed the one associated with the certificate provided by the option. This additional check is useful in multi-level PKI where one needs to enforce that the peer certificate is from a specific branch of the tree.
This option makes sense only when used in combination with the OptionSSLVerifyPeer option. Otherwise, the result of the check is not considered as failure.
A specific error code (CURLE_SSL_ISSUER_ERROR) is defined with the option, which is returned if the setup of the SSL/TLS session has failed due to a mismatch with the issuer of peer certificate (OptionSSLVerifyPeer has to be set too for the check to fail). (Added in 7.19.0)
CURLSMBS.SetPathNetRCFile(path as folderitem)
| Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
| method | CURL | MBS CURL Plugin | 10.0 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
If this option is omitted, and OptionNETRC is set, libCURL will attempt to find the a .netrc file in the current user's home directory. (Added in 7.10.9)
The Lasterror property is set. 0 for success.
You can set this value and later you can read it, but you cannot read the default value.
CURLSMBS.SetPathProxyIssuerCert(path as folderitem)
| Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
| method | CURL | MBS CURL Plugin | 20.3 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
Pass a string naming a file holding a CA certificate in PEM format. If the option is set, an additional check against the peer certificate is performed to verify the issuer of the the HTTPS proxy is indeed the one associated with the certificate provided by the option. This additional check is useful in multi-level PKI where one needs to enforce that the peer certificate is from a specific branch of the tree.
This option makes sense only when used in combination with the OptionProxySSLVerifyPeer option. Otherwise, the result of the check is not considered as failure.
A specific error code (CURLE_SSL_ISSUER_ERROR) is defined with the option, which is returned if the setup of the SSL/TLS session has failed due to a mismatch with the issuer of peer certificate (OptionProxySSLVerifyPeer has to be set too for the check to fail).
CURLSMBS.SetupEmail(email as Variant) as boolean
| Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
| method | CURL | MBS CURL Plugin | 14.3 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
You can set your own settings like proxy after this function call.
If you like you can reuse the email and CURL objects after you sent an email, change values and send another email.
Returns true on success or false on failure.
Some examples using this method:
The items on this page are in the following plugins: MBS CURL Plugin.