Difference between revisions of "Ns ModuleInit()"

From AOLserver Wiki
Jump to navigation Jump to search
(created page)
 
 
Line 4: Line 4:
 
#. Read configuration data, if any
 
#. Read configuration data, if any
 
#. Initialise data structures, if any
 
#. Initialise data structures, if any
#. Initialise the server's Tcl interpreter with any Tcl function you wish to provide: see [[Ns_TclInitInterps]]
+
#. Initialise the server's Tcl interpreter with any Tcl function you wish to provide: see [[Ns_TclInitInterps()]]
 
#. Other things your module needs to do after being loaded but before being called.
 
#. Other things your module needs to do after being loaded but before being called.
  

Latest revision as of 16:17, 3 December 2005

Ns_ModuleInit()

This function is called by the server after the module is loaded. Implementation here entails:

  1. . Read configuration data, if any
  2. . Initialise data structures, if any
  3. . Initialise the server's Tcl interpreter with any Tcl function you wish to provide: see Ns_TclInitInterps()
  4. . Other things your module needs to do after being loaded but before being called.
int Ns_ModuleInit(char *hServer, char *hModule)
{
  return (Ns_TclInitInterps(hServer, MyInterpInitFuncName, NULL));
}