Topics
All
MacOS
(Only)
Windows
(Only)
Linux
(Only, Not)
iOS
(Only, Not)
Components
Crossplatform Mac & Win
Server
Client
Old
Deprecated
Guides
Examples
Videos
New in version:
9.3
9.4
9.5
10.0
10.1
10.2
10.3
10.4
10.5
10.6
Statistic
FMM
Blog
CURL.SetOptionConnectionTimeout
Sets the connection timeout in seconds.
| Component | Version | macOS | Windows | Linux | Server | FileMaker iOS SDK |
| CURL | 2.5 | Yes | Yes | Yes | Yes | Yes |
Parameters
| Parameter | Description | Example |
|---|---|---|
| curl | The CURL session handle. | $curl |
| Value | The connection timeout time in seconds. | 300 |
Result
Returns "OK" on success.
Description
Sets the connection timeout in seconds.Pass the maximum time in seconds that you allow the connection to the server to take. This only limits the connection phase, once it has connected, this option is of no more use. Set to zero to switch to the default built-in connection timeout - 300 seconds. See also the CURL.SetOptionTimeOut option.
See also CONNECTTIMEOUT option in CURL manual.
Examples
Set timeout to 30 seconds:
MBS( "CURL.SetOptionConnectionTimeout"; $curl; 30 )
Check if SMB (port 445) is open on a given IP in network:
Let ( [
curl = MBS("CURL.New");
a = MBS( "CURL.SetOptionConnectOnly"; curl; 1 );
b = MBS( "CURL.SetOptionURL"; curl; "192.168.2.117" );
c = MBS( "CURL.SetOptionConnectionTimeout"; curl; 1 );
d = MBS( "CURL.SetOptionPort"; curl; 445 );
r = MBS( "CURL.Perform"; curl );
x = MBS( "CURL.Release"; curl)
]; r )
// returns either
// OK
// or
// 28: Connection timed out after 1000 milliseconds
See also
- CURL.New
- CURL.Perform
- CURL.Release
- CURL.SetOptionConnectOnly
- CURL.SetOptionConnectTimeoutMS
- CURL.SetOptionFTPResponseTimeout
- CURL.SetOptionSSHPublicKeyfile
- CURL.SetOptionSSLVersion
- CURL.SetOptionTimeOut
- CURL.SetOptionURL
Example Databases
- CURL/CURL Check FileMaker Server
- CURL/WebServices/CURL FMS Admin API v17
- CURL/WebServices/CURL FMS Admin API v18
Blog Entries
Created 18th August 2014, last changed 19th April 2020
CURL.SetOptionConnectTo - CURL.SetOptionCookie
Feedback: Report problem or ask question.
Links
MBS Xojo tutorial videos