This function allows you to connect to a TCP/IP server by specifying connection options.
Context
Windows client,
Windows server,
Java client,
Java server,
Adelia Web client,
Adelia Cloud client,
Event Adelia client.
Parameters
ALPHA(n) |
Server |
Host name or IP address of the server. |
||||||||||||
NUM_BIN_4 |
Port |
Server's port number |
||||||||||||
ALPHA(n) | Options |
Options. List of "option=value" pairs, separated with ';' characters. The possible options are described later.
|
||||||||||||
NUM_BIN_4 |
Socket |
Socket handle. |
||||||||||||
NUM_BIN_4 |
ReturnCode |
Operation return code: 0 Operation completed successfully Other Specific error code |
* NB: the connection timeout cannot exceed the default value set at system level. In the Windows version, if the connection fails using the default IPV4, the runtime retries using IPV6. The effective timeout is therefore twice the indicated value. The timeout only applies to the connection. An additional (non-configurable) time can apply if DNS name resolution fails.
Example
ALPHA(128) | Host |
NUM_BIN_4 | Port |
ALPHA(128) | Options |
NUM_BIN_4 | Socket |
NUM_BIN_4 | Rc |
* Connection with a 5 seconds timeout
Server = 'host.domain.com'
Port = 10000
Options = 'connect_timeout=5000'
CALL_DLL 'VATOOLBX.DLL' 'VaToolBxSockConnectTcpServerEx' Host Port Options Socket Rc
IF Rc = 0
* connection established
...
List of the VaToolBx functions by topic