Injun API


Overview

The Injun Application Server consists of the following set of functions which allow the creation of a module which can be loaded and unloaded into the server.

The distribution also contains trhe source code and makefiles that demonstrate the api.


Adding and Removing Callbacks

Function Description

injun_add_page Adds a static or dynamic web page to the default tree. This may also be a callback function
injun_remove_page Removes the page from the default tree
injun_add_timeout Adds a callback function to be executed at a given time
injun_remove_timeout Removes a timeout callback routine

Creating HTML pages

Function Description

injun_add_header Adds a header to an existing html body.
injun_add_footer Adds a footer to an existing html body

Notes These function will not work with framesets

Adding Handlers

Function Description

injun_add_handler Adds a callback handler routine and file descriptor pair. The callback will be called every time the file descriptor is ready.
injun_remove_handler Removes the callback handler - file descriptor pair

Registering and Unregistering

Function Description

injun_register_application Registers the application with the Injun Application Server.
injun_deregister_application Unregisters the application.

Utility Routines

Function Description

injun_serve_header This routine serves the HTTP header for the given content type and length.
injun_default_page_handler This is the default routine that will serve a static or dynamically allocated web page.

Header Files

The following header files give the exact details of the api


Source Files

The following source files are also included as demonstration modules.


Compiling Modules

The following line will compile the tim module for Solaris.

gcc -D_REENTRANT -DSOLARIS -Wall -gstabs+ -I. -o libtim.so -G -fPIC tim.c
    

last updated 18-February-2000