Specifies the TCP/IP port that the AVM uses to listen for new connections. Once called, the AVM automatically listens for and accepts new connections for the specified port.

Return type: LOGICAL

Applies to: Server socket object handle

Syntax

ENABLE-CONNECTIONS ( connection-parms )
connection-parms
A character string expression that contains a space-separated list of one or more socket connection parameters.

The following table describes the socket connection parameters you can include in this string.

Table 1. Socket connection parameters
Parameter Description
-S socket-port Required. The TCP/IP port number that the AVM listens to and accepts connections on. You can specify an explicit port number or a TCP service name. If you specify a service name, the method uses the port associated with that name in the TCP/IP services file.
-H hostname Optional. The host name or IP address of the network interface that the AVM should bind to and accept connections on. Use this parameter to restrict the server socket to a specific network interface — for example, specify localhost to accept connections only from the local machine. If this parameter is not specified, the server socket listens on all available network interfaces.
-pf filename Optional. Specifies a text file that contains one or more socket connection parameters described in this table. If this file contains other OpenEdge startup parameters, they are ignored.
-qsize backlog Optional. Specifies the maximum number of pending connection requests that can be queued while previously accepted connections are being processed. If the queue is full when a connection request is received, the request is refused. The default value depends on the platform.

On some platforms, the supplied value is modified before it is applied. For details, see the documentation for your platform.

-ssl Optional. Specifies that the connection is TLS‑based. Use this option only when TLS is required, as TLS can incur performance overhead depending on system resources and load.
-keyalias aliasname Optional. Specifies the alias name of the public/private key and digital certificate to use from the keystore. If not specified, the default default_server key alias is used. This parameter applies only when -ssl is specified.
-keyaliaspasswd encpwd Optional. Specifies the password used to access the public/private key and digital certificate. When -keyalias is specified, this parameter must also be specified. The default password is available only when using the default_server certificate.
-nosessioncache Optional. Disables TLS client session caching. This parameter applies only when -ssl is specified.
-sessiontimeout [seconds] Optional. Specifies the maximum time, in seconds, that the server waits before rejecting a client request to resume a TLS session. The default value is 180 seconds. This parameter applies only when -ssl is specified.

An application server cannot act as a socket server, since they are already listening on a port. ENABLE-CONNECTIONS is only valid from batch clients, GUI clients and character clients. This method will generate an error if it is called from an invalid application. This method will also generate an error if it is called multiple times without the DISABLE-CONNECTION( ) method being called in between.

Note: Connections to a TLS-enabled server socket require the management of public keys on the client (TLS client) and private keys on the server (TLS server). For ABL sockets, the TLS client is the ABL session initiating the TLS connection on a socket object and the TLS server is the ABL session enabling TLS connections on a server socket object. For information on using TLS to secure an ABL socket connection, see the sections on sockets in OpenEdge Programming Interfaces. For more information on TLS and managing private key and digital certificate stores for OpenEdge TLS clients and servers, see Learn about Security and Auditing.