This library contains a minimalistic implementation of HTTP 1.0 server for VxWorks targets. Also it provides XML RPC (server) interface via HTTP.
The latest version 1.1.0 can be downloaded via this link.
printf()to output directly to the client).
All configuration parameters are in
httpd.h header file. None of these
parameters can be modified in runtime.
|HTTPD_MAX_SESSIONS||Specified number of clients' session the server may create. Each session is a separate task (thread) that handles HTTP communication with a client. Move sessions you allow, more clients can connect to the server at the same time. If you use CGI function that may cause some delay, it's better to allow several sessions.|
Number of milliseconds the server waits for the request from a just connected
client. If this time expires, the server drops connection (see |
Number of 'wait cycles' the server waits for the request from a client. If
keep-alive option is enabled, the server will wait in total for
Once this parameters is defined, all output to the stdio of CGI functions
will be automatically redirected to a client. This concerns only those functions
called from HTTP session tasks. All other functions will continue to output
to stdio. If you want your CGI function to output in stdio, you have to disable
this option. In this case you may use |
|HTTPD_MAX_INPUT_BUFFER_SIZE||Number of bytes the server may receive from a client as a HTTP request. Normally HTTP requests are quite short, so you may want to change this value in order to save some memory. If an incoming request is longer than this value, the server will drop connection with an error.|
Size of a buffer used by |
|HTTPD_MAIN_PRIORITY||HTTP main task priority. Main task accepts incoming connections and create session tasks.|
|HTTPD_SESSION_PRIORITY||Session tasks priority.|
|HTTPD_MAIN_STACK_SIZE||Stack allocated for HTTP server main task. You do not need to change this value since CGI functions stack is allocated from sesstions tasks stack.|
|HTTPD_SESSION_STACK_SIZE||Stack allocated for every session task. You may want to increase this value if your CGI function uses alot of local variables. Pay attantion to this elsewhere stack overflow may easily occured in while executing your CGI function.|
|HTTPD_ALLOW_FILES||If this option is defined, the server may transfer files from local file system to a client (just like an ordinal web server).|
|HTTPD_DOC_ROOT||If you allow file serving, this parameter should specify a location of files visible to a server.|
Name of a file the server will try to forward to a client in case when requested
URL does not cantain explicitely a name of a file (like |
Examples of usage
See an example of HTTP server usage in file
example.c contained in httpd package,
or follow this link to browse the source code.
For XML RPC example, please follow this link or take a look at
example_xmlrpc.c file contained in httpd package.
Project Web Hosted by