On Thu, 14 Jun 2001, Rob Mayoff wrote:
> > 1. Can I use Ns_TclGetConn(NULL) in a function which is set to handle
> > url2file?
> You can use that, or just Ns_GetConn.  However, neither of these will
> work in 4.0.

Well, basically what I want is the url2file to return path using the
hostname from conn. Any chance of doing that in 4.0?

> Use a TLS.  Check out Ns_TlsAlloc, Ns_TlsGet, Ns_TlsSet.  Look at
> dstring.c and serv.c for examples.

Ns_Tls mytls;
in Module_Init:
Ns_TlsAlloc(&mytls,NULL);

in my handler:
struct mystruct mys;
Ns_TlsSet(&mytls,&mys);

and someplace in the xmlreturnfunc:
struct mystruct *ms;
ms=Ns_TlsGet(&mytls);

That's basically it?

--
Wojtek Kocjan
[EMAIL PROTECTED]

Reply via email to