Due to various requests noted on the MPE news group, I have written a sample Client/Server application to show the basic mechanics of TCP/IP protocol and the HPe3000. The zip file below contains a sample TCP/IP client, written in Visual Basic, and a sample TCP/IP server for the HPe3000 server written in Cobol. The Cobol program is based on articles written by Joe Sagan in Interact magazine July and August 1993. Unzip the files to your PC, and then copy the file SKSAMPCB.TXT to your HPe3000. Compile the file to an NMOBJ, and the link the file, using SOCKETXL, e.g.
The server will display a message "Waiting for client on port 9876".
Run Visual Basic, and open the project sockets.vbp. Run the project, enter the IP Address or name of your server in the box labelled 'Host Name', then click on Connect. The client will connect to your server process, and display a message to this effect. Enter a string of data in the box labelled 'Data to send', and then click on Send. This will send the data to the server, and should echo back a response. The server will display the first 20 characters of the data sent.
Since I released this code, I discovered that the Winsock control used in the VB sample has a memory leak. Every time you transmit and receive a message, the control does not release the bytes used. There are a couple of alternatives to the Microsoft control. A free socket control is available from www.catalyst.com,or an alternative can be found at www.mabry.com.This bug does not affect GUI3000, as GUI3000 uses 'native' calls to the winsock dll.
This is only a very simple example of the protocol, and should be used as a learning tool only. If you have any questions about this sample, please e-mail me on email@example.com .