| iMatix home page
| << | < | > | >>
SMT Logo SMT
Version 2.81

 

The HTTP Agent - SMTHTTP

Provides the HTTP service on port 80.

To use SMTHTTP, call smthttp init(). This initialises the HTTP service on TCP port 80. If you set the global variable ip_portbase to some value before initialising SMTHTTP, the HTTP port is moved by that value. For instance, if you set ip_portbase to 8000, the HTTP port is 8080. This lets you run the service in 'user space': on most systems you need root access to use ports below 1000.

To connect to a webserver running on some system at port 8080, use this URL: http://hostname:8080/.

The current implementation of SMTHTTP is quite sophisticated. It will look for default.htm, default.html, index.htm, index.html in that order if no filename is specified. The file smthttp.aut defines directories that are protected by username/password definitions. You can find the full documentation for the web server in the Xitami package.

The program xitami.c is a fairly complete web server based on the SMTHTTP agent. You can use this program as-is, or as a basis for your own work.

SMTHTTP Implementation

The hypertext view of SMTHTTP's dialog and source code may help to understand how SMTHTTP works.


| << | < | > | >> iMatix Copyright © 1996-99 iMatix Corporation