I don't know where it's documented, but that's been the behavior for a
long time; we've relied on it since 3.4.2, and I think Alex Hisen showed
me it working in 2.0.  I wanted to remember reading it in the Tcl
modules section or the server startup section of the old 3.0 manual
that's still @ tcl.tk.org, but a reread doesn't find it. Reconstructing
the history of our use of the pattern suggests we never did see it
documented.  I think I'll go try to find a wiki page to update :-)

It's super handy when you want to have a very simple C API that can
leave most of its argument parsing, integrity checking, or even its
complete data initialization to a set of Tcl wrappers. It's the same
design pattern (though it uses init.tcl and doesn't package its own tcl
library to do it) that's allowed nsperm to remain somewhat usable all
these years.  

In fact, we took our original use of the pattern from nsperm, and it
took us another year or so to discover we didn't have to package things
quite so badly (i.e., by putting all the tcl files that supported a C
API directly in the modules/tcl directory).

-- ReC

-----Original Message-----
From: AOLserver Discussion [mailto:[EMAIL PROTECTED] On Behalf
Of Tom Jackson
Sent: Wednesday, April 16, 2008 9:57 AM
To: [email protected]
Subject: Re: [AOLSERVER] Compression

On Tuesday 15 April 2008 18:22, Tom Jackson wrote:
> I'll try to combine Daniel's code with my filter to turn on the switch
for
> ns_return.

I have a test release of the nszlib module, which handles ADP
compression, and 
static files (taken from Daniel's example filters), plus dynamic data 
returned via ns_return. There is also an example configuration section:

http://rmadilo.com/files/nszlib/

Feedback needed!

I also discovered a strange feature that I don't think is documented
anywhere. 

Server modules are added like this:

ns_section ns/server/server1/modules
 ns_param mymodule /path/to/bin/mymodule.so
 # Tcl module (in server1/modules/tcl/mytclmodule)
 ns_param mytclmodule tcl

With nszlib, there is now both a shared and Tcl module, 

However if the Tcl module is in server1/modules/tcl/nszlib, you only
need one 
entry to cover both:

ns_section ns/server/server1/modules
ns_param nszlib /path/to/bin/nszlib.so

AOLserver automatically looks in the private tcl directory for nszlib! 

tom jackson


--
AOLserver - http://www.aolserver.com/

To Remove yourself from this list, simply send an email to
<[EMAIL PROTECTED]> with the
body of "SIGNOFF AOLSERVER" in the email message. You can leave the
Subject: field of your email blank.


--
AOLserver - http://www.aolserver.com/

To Remove yourself from this list, simply send an email to <[EMAIL PROTECTED]> 
with the
body of "SIGNOFF AOLSERVER" in the email message. You can leave the Subject: 
field of your email blank.

Reply via email to