GoServe is an ordinary 32-bit OS/2 application program (it has no special privileges, and uses only public interfaces to OS/2 and to TCP/IP). When starting GoServe, you should specify as a parameter the protocol that the server is to use (HTTP or GOPHER).
Once started, GoServe sets up a TCP/IP socket on the 'well-known' port for the protocol selected (this can be altered using a different startup parameter), then waits for requests from clients. When a request from a client arrives, it is recorded in the audit file (if desired) and then the GoServe filter for the port is called.
The GoServe filter is a program written in Rexx, which is given details of the client and the request string. The filter decides on the information (usually a file, containing a document or other data) to be sent to the client, and returns details to GoServe. GoServe then sends the HTTP response and the data to the client and closes the TCP/IP connection.
Each incoming request is given a new OS/2 thread for communication, filter processing, and response. GoServe handles all the details of threads and TCP/IP communications, so you need only be concerned with the filter (which can often simply be the sample filter, unchanged) and the data (documents, images, etc.).
[ previous section | GoServe | next section ]
From 'goserve.doc', version 2.32.
Copyright © International Business Machines Corporation, 1993, 1995.
All rights reserved.