Progress
External Program
Interfaces


Implementing a 4GL Socket Server

To implement a socket server, follow these steps:

  1. Create a server socket object using the CREATE SERVER-SOCKET statement.
  2. Enable the server socket to listen for connections using the ENABLE-CONNECTIONS( ) method. This assigns the socket to a specified TCP/IP port on which Progress listens and accepts connection requests.
NOTE: ENABLE-CONNECTIONS() also lets you set the length of the pending-connection queue. For more information, see the reference entry for the ENABLE-CONNECTION() method in the Progress Language Reference .

  1. Specify a CONNECT event procedure using the SET-CONNECT-PROCEDURE( ) method.
  2. Wait for CONNECT events using a blocking I/O statement or poll for CONNECT events using the PROCESS EVENTS statement.

Once you have a connection established from a client, you can read data from and write data to the client on the connection. You can also manage the server socket that you have enabled for listening.

The following sections describe these steps in more detail.


Copyright © 2004 Progress Software Corporation
www.progress.com
Voice: (781) 280-4000
Fax: (781) 280-4095