| A W3 server usingVMS DCL language | cern archive | HTTP only |
| home archive home about | |||||||||||||
DCL ServerIt is possible to write a W3 server in DCL, the VMS command interpreter language. This has the advantage (over C for example) of quick prototyping and easy access to the VMS systems functions available in DCL. Seee also:The KVI WWW server. Server structureThe server must run in a DCL environment. That is, if it is run as a detached process, this must be done by running LOGINOUT.EXE with a command file as input. That command file will run the server executable WWW_SERVER.EXE.The WWW_SERVER.EXE program will loop waiting for connection from a W3 client. When it gets one, it calls a DCL command of your choice (defined at WWW_SERVER.EXE compile time) passsing it the device name of the channel for communication with the client, the document id requested, and search terms if any. The DCL command (here we assume it is a call to a command file) analyses the request and returns the result ot the client through the given channel. The WWW_SERVER.EXE program may also be run from the command line for testing: SourceThe source files all can be taken from the regualar WWWDaemon_v.vv.tar.Z distribution file except:
Writing the DCL fileWhen you write the DCL file, you should bear in mind that the W3 protocol is a telnet-style protocol, and requires each line to be terminated with a CR, LF pair. (Carriage Return, Line feed, ASCII 13,10). The example code shows how you can append a CRLF pair to the end of a DCL output line.The first parameter passed to the command file is the device name of the internet socket. This must be opened for write by the DCL file. Thanks to Jonathan Streets (FNAL) for figuring that bit out. Building the serverTo make the WWW_SERVER.EXE file, you run MMS with the macro MULTINET=1 defined. Put the MMS file as descrip.mms in the same directory. |
|
||||||||||||