NetCentric Computing with Object Rexx: 

   "Programming Examples using TCP/IP Sockets" 

This package provides a number of programming examples with increasing 
complexity for client as well as server programming using Object Rexx.  

The programming examples are based on stream socket services provided by 
TCP/IP. These services are made available to the Rexx programming environment 
through the Rexx Socket services via the dynamic load library RXSOCK coming 
with your Rexx installation. 

To make programming of servers and their associated clients easy, the 
following frameworks are provided with this package:

 1. TCP/IP Sockets Framework implemented by the tcpSockets class
    (see file Sockets.frm)

 2. Clients Framework implemented by the tcpClients class
    (see file Clients.frm)

 3. Server Framework implemented by the tcpServer class
    (see file Servers.frm)

Both, the client and the server frameworks are based on the sockets framework
and therefore REQUIRE the sockets class. 

Based on the tcpClient and tcpServer classes, a number of sample client/server  
applications are provided with server and client coding examples provided in 
separate object Rexx command files having the extension ".cmd". From a clients
point of view, the different applications are identified by their port numbers. 

The following is a list of associated clients and servers with the port    
numbers to be used to address a particular server application from a suitable
client. 

 1. Bounce Server (port 1920)
 
    Client: basic_c  
    Server: bounce_s 
 
 2. Mirror Server (port 1921)
 
    Client: basic_c  
    Server: mirror_s 
 
 3. Yodel Server (port 1923)
 
    Client: yodel_c  
    Server: yodel_s 
 
 4. Chat Server (port 1924)
 
    Client: chat_c  
    Server: chat_s 
 
 5. Command Server (port 1922)
 
    Client: cmmnd_c  
    Server: cmmnd_sX 
 
    where the trailing X on the server name can be 1, 2, or 3 representing 
    various implementation stages with increasing functionality:
 
    * cmmnd_s1  - base version. Unknown commands are handled.
    * cmmnd_s2  - extension of base version by the HELLO command.
    * cmmnd_s3  - extension providing SHUTDOWN service from a local client.

To execute the above examples, you first need to start the server from a 
command prompt using the directory containing these programming examples as  
your current directory. The server will be brought up and indicate by an 
appropriate message that it is ready to accept clients.
The server can always be terminated again by entering CTRL-C while the server 
window is active.

When the server has been started successfully, an associated client may be 
started from the command prompt of another window, The client window can   
be on any system that has TCP/IP services active (TCP/IP host).
In this case, the port number of the server application and the TCP/IP 
hostname of the server have to be specified as a parameter to the client
invocation.   

 Example 

   server:

     yodel_c

     Remark: It is assumed that the tcp/ip hostname of the server 
             system is "egon". The port number for the yodel server is "1923".

   client:

     yodel_c 1923 egon

     where:

       1923  is the port number of the yodel server application 
       egon  is the tcp/ip hostname of the server system

 Remark: Beware that in system environments where Object Rexx is not active 
 by default (e.g. Windows95 and WindowsNT), the command entered has to be
 preceded by "REXX" (e.g. REXX yodel_c).

Any number of clients can be started on any system running Object Rexx with 
TCP/IP connection to the system running the server. 

On all client/server sample applications, except for the simple ones 
(bounce and mirror servers), the client establishes a longer lasting 
connection to the server by starting a session. During a session the 
client may receive input from the user at any time being sent to the 
connected server. The server processes this input and responds to it 
depending on the application services it is providing. 

Generally, a client session may be terminated by entering "QUIT". This 
terminates all server processes associated with this client and in turn all 
client processes thus shutting down the client,

NOTE: The programming samples in this package provide already a fair amount
of control logic that ensures the server as well as any client to be in 
a controlled state in case of any network problems, so avoiding nasty   
problems, such as hangs or infinite loops.


Have fun with client/server programming with Object Rexx!
