Difference between revisions of "Module inclusion"
Jump to navigation
Jump to search
(New page: Typical AOLServer modules are written in either Tcl, C, or some combination of those languages (though, of course, new languages can be added via the C module interface). They are include...) |
(No difference)
|
Revision as of 18:08, 16 April 2008
Typical AOLServer modules are written in either Tcl, C, or some combination of those languages (though, of course, new languages can be added via the C module interface). They are included into your runtime using a section of the AOLServer Configuration file.
Configuring a binary or combined binary & Tcl module into your server
As documented somewhere else in the wiki, a binary module is a dynamically loadable library (.so or .dll) that will be linked into your server at startup. To get it linked in, you:
- Put the file in the right directory with an appropriate extension:
- In the default configuration of AOLServer, the right place is usually {your installation directory}/bin (e.g., /usr/local/aolserver/lib). In the AOLServer configuration file, by convention, this directory name is written as "${bindir}". Some installations use a separate "${homedir}/lib" (thus ${libdir}) directory.
- Tell AOLServer it's there, and that you want to use it for your virtual server.
- In the modules section associated with your virtual server (e.g., "ns/server/${servername}/modules" in nsd.tcl), add the library using the syntax:
ns_param configurationSectionName locationOfDynamicLibrary
- For example:
- In the modules section associated with your virtual server (e.g., "ns/server/${servername}/modules" in nsd.tcl), add the library using the syntax:
ns_param nsopenssl "${bindir}/nsopenssl.so"
- Restart your server. You should see a line that looks like
[15/Apr/2008:15:39:35][31632.18446744071924766624][-main-] Notice: modload: loading '/usr/local/aolserver/bin/nsopenssl.so'