One more thing worth mentioning... Starting with AOLserver 3.5.x, a
number of the core API's were moved into a library (libnsd.so) which is
used by AOLserver itself, and can also be used by something like tclsh.

Once you load the nsd library, you'll see that there are a number of
ns_* API's available:

% tclsh
% load aolserver/lib/libnsd.so
% join [lsort [info commands ns*]] \n
ns_addrbyhost
ns_after
ns_atexit
ns_atshutdown
ns_atsignal
ns_cache_flush
ns_cache_keys
ns_cache_names
ns_cache_size
ns_cache_stats
ns_cancel
ns_charsets
ns_chmod
ns_cleanup
ns_cond
ns_config
ns_configsection
ns_configsections
ns_cp
ns_cpfp
ns_critsec
ns_crypt
ns_encodingforcharset
ns_env
ns_event
ns_fmttime
ns_ftruncate
ns_gifsize
ns_gmtime
ns_guesstype
ns_hostbyaddr
ns_hrefs
ns_http
ns_httptime
ns_info
ns_init
ns_job
ns_jpegsize
ns_kill
ns_link
ns_localtime
ns_log
ns_logctl
ns_logroll
ns_markfordelete
ns_mkdir
ns_mktemp
ns_modulepath
ns_mutex
ns_normalizepath
ns_parseheader
ns_parsehttptime
ns_parsequery
ns_pause
ns_purgefiles
ns_quotehtml
ns_rand
ns_rename
ns_resume
ns_rmdir
ns_rollfile
ns_rwlock
ns_schedule_daily
ns_schedule_proc
ns_schedule_weekly
ns_sema
ns_set
ns_sleep
ns_sockaccept
ns_sockblocking
ns_sockcallback
ns_sockcheck
ns_socketpair
ns_socklisten
ns_socklistencallback
ns_socknonblocking
ns_socknread
ns_sockopen
ns_sockselect
ns_striphtml
ns_symlink
ns_thread
ns_time
ns_tmpnam
ns_truncate
ns_unlink
ns_unschedule_proc
ns_urldecode
ns_urlencode
ns_uudecode
ns_uuencode
ns_writefp
%

Hope this helps!

- Nathan



Scott Goodwin wrote on 3/30/2004, 9:34 AM:

 > Right now you have two choices that I'm aware of: run AOLserver, or
 > replicate whatever part of its Tcl API you need to test with. For
 > example, I have several access control procs that work with IP
 > addresses, usernames and so on. I want regression tests on these to be
 > run after any changes to the server or our codebase to ensure the ACL
 > code is still working the way we expect against a known data set. To do
 > this I can create a straight Tcl version of ns_conn that simply returns
 > the test info I tell it to. I can then source this fake ns_conn and my
 > ACL .tcl file, then make calls to my ACL procs and validate the
 > results. Trying to perform this test with the running server is
 > actually more difficult because ns_conn is going to return the real
 > information. There are ways to get around this for testing purposes,
 > but the hurdle gets higher as you want more tests against more parts of
 > your code.
 >
 > To test ns_httpget you could take the http.tcl file, recreate any
 > ns_sock*, ns_config and other AOLserver procs in Tcl, then use these to
 > run your tests against in straight Tcl.
 >
 > /s.
 >
 >
 > On Mar 23, 2004, at 1:09 AM, Wei Shi wrote:
 >
 > > Does anybody know how to call an aolserver tcl command, like ns_httpget
 > > without running aolserver?  What I am trying to do here is to test and
 > > integrate these commands with my other applications before putting
 > > them into
 > > a package on aolserver.  I tried "load" command in tcl but failed.  Has
 > > anybody done this before?
 > >
 > > Thanks.
 > >
 > >
 > > --
 > > 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.
 >


--
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