Difference between revisions of "Using the Tcl Library"

From AOLserver Wiki
Jump to navigation Jump to search
(imported from WiKit id 822)
 
 
Line 1: Line 1:
i m currently
+
The server has two Tcl directories (or "libraries").  One is "shared"
working
+
which means all servers source its contents at start-up.  The shared
on linux
+
library location is not directly configurable.  It is set to the
 +
subdirectory "modules/tcl" within [ns_info home], or:
 +
 
 +
    [ns_info home]/modules/tcl
 +
 
 +
This can be retrieved from within a script using [ns_library shared].
 +
 
 +
Then, there is a per-server Tcl directory that's referred to as
 +
"private" which is configured using the config section
 +
"ns/server/${servername}/tcl" and the "library" parameter.  If not
 +
specified in the config, it defaults to the server's module directory,
 +
in the "tcl" subdirectory, which is:
 +
 
 +
    [ns_info home]/servers/${servername}/modules/tcl
 +
 
 +
== See also ==
 +
 
 +
* [[ns_info]] home
 +
* [[ns_library]]

Latest revision as of 13:30, 7 March 2006

The server has two Tcl directories (or "libraries"). One is "shared" which means all servers source its contents at start-up. The shared library location is not directly configurable. It is set to the subdirectory "modules/tcl" within [ns_info home], or:

   [ns_info home]/modules/tcl 

This can be retrieved from within a script using [ns_library shared].

Then, there is a per-server Tcl directory that's referred to as "private" which is configured using the config section "ns/server/${servername}/tcl" and the "library" parameter. If not specified in the config, it defaults to the server's module directory, in the "tcl" subdirectory, which is:

   [ns_info home]/servers/${servername}/modules/tcl

See also