Connects a socket to the specified TCP/IP port on the specified host.
Return type: LOGICAL
Applies to: Socket object handle
The following table describes each socket connection parameter, which can be included in this string.
Parameter | Description |
---|---|
-H socket-address | Optional. The host name or IP address to which the connection is to be established. |
-S socket-port | The port number for the socket connection. You can specify either an explicit port number or a TCP service name. If you use a TCP service name, the method uses the port number associated with that name in the TCP/IP services file. |
-ssl | If specified, the connection to the server socket uses Secure
Sockets Layer (SSL) tunneling. (Used in conjunction with the -H and -S parameters.) Note: Be sure you need SSL before using this option. SSL incurs more
or less heavy performance penalties, depending on resources and
load.
|
-nosessionreuse | If specified, the connection does not reuse the SSL session
ID when reconnecting to the same SSL-enabled server socket. Note: OpenEdge SSL turns on SSL session reuse by default. So, after the initial
connection to a given host (-H) and port
(-S), each subsequent connection to the
same host and port restarts the SSL session and ignores any
different connection parameters that are specified for the subsequent
connection, including -nosessionreuse. If you want to
change SSL socket options (such as -nohostverify) for each
subsequent connection to a given host and port, be sure to specify the
-nosessionreuse parameter on the initial SSL
socket connection to that same host and port.
|
-nohostverify | If specified, turns off host verification for an SSL-enabled connection to a server socket. Without this parameter specified, the client compares the host name specified in the connection with the Common Name specified in the server certificate, and raises an error if they do not match. With this parameter specified, the client never raises the error. For more information, see OpenEdge® Getting Started: Core Business Services - Security and Auditing. |
-pf filename | Optional. A text file containing any of the socket connection parameters described in this table. If this file contains any other OpenEdge startup parameters, this method ignores them. |
If an error occurs while executing the CONNECT( ) method, the method returns FALSE. Otherwise, it returns TRUE.
When an ABL client (that is not SSL-enabled) calls the CONNECT( ) method and immediately reads data from the socket using the READ( ) method, and an ABL server (that is SSL-enabled) calls the ENABLE-CONNECTIONS( ) method and immediately writes data to the socket using the WRITE( ) method, a deadlock condition can occur. That is, the client is waiting for the server to send data, and the server (regardless of the Write operation) is waiting for the client connection to send data that starts the SSL connection.