Tcl API

From AOLserver Wiki
Jump to: navigation, search

Links to all of the Tcl commands provided by the AOLserver core "out of the box". To view a complete list of these commands in alphabetical order, try the Category:Core Tcl API page.

Like what you see here? Want to try your hand at documenting a command, too? Here's how to document the core Tcl API.

You can download a syntax method tip / auto-completion file (from aolserver.am.net) for the free Komodo Edit 5 (includes Tcl, all of ns_* APIs and some popular AOLserver modules and Tcl packages). Place it into "%ProgramFiles%\ActiveState Komodo Edit 5\lib\support\tcl\" replacing the default Tcl-only file that comes with Komodo Edit.

Contents

ADP, Request and Response-oriented commands

ns_adp_abort, ns_adp_append, ns_adp_argc, ns_adp_argv, ns_adp_bind_args, ns_adp_break, ns_adp_close, ns_adp_ctl, ns_adp_debug, ns_adp_debuginit, ns_adp_dir, ns_adp_dump, ns_adp_eval, ns_adp_exception, ns_adp_flush, ns_adp_include, ns_adp_mime, ns_adp_mimetype, ns_adp_parse, ns_adp_puts (ns_puts), ns_adp_return, ns_adp_safeeval, ns_adp_stats, ns_adp_stream, ns_adp_tell, ns_adp_trunc
Registered (fka fancy) ADP tags:
ns_adp_registeradp (same as deprecated ns_adp_registertag)
ns_adp_registerproc
ns_adp_registerscript (same as deprecated ns_register_adptag)
Request information and received content:
ns_conn, ns_conncptofp (same as deprecated ns_writecontent)
ns_getform, ns_getformfile
ns_queryexists, ns_queryget, ns_querygetall
ns_browsermatch
Standard response commands:
ns_return, ns_returnadminnotice, ns_returnbadrequest, ns_returnerror, ns_returnfile, ns_returnforbidden, ns_returnfp, ns_returnmoved, ns_returnnotfound, ns_returnnotice, ns_returnok, ns_returnredirect, ns_returnunauthorized
More control over response:
ns_setexpires, ns_updateheader, ns_respond
Manual response:
ns_headers, ns_startcontent, ns_write, ns_writefp / ns_connsendfp (deprecated)

Cache commands

ns_cache, ns_cache_flush, ns_cache_keys, ns_cache_names, ns_cache_size, ns_cache_stats

Concurrent programming commands

ns_cond, ns_critsec, ns_event, ns_job, ns_kill, ns_mutex, ns_sema, ns_thread

Custom data structures and variable manipulation commands

  • TclX keyed lists:
keyldel, keylget, keylkeys, keylset
nsv_get, nsv_exists, nsv_set, nsv_incr, nsv_append, nsv_lappend, nsv_array, nsv_unset, nsv_names
  • Sets and multisets:
ns_findset, ns_set
  •  ???
ns_share, ns_var

Database commands

ns_buildsqldate, ns_buildsqltime, ns_buildsqltimestamp, ns_db, ns_dbquotename, ns_dbquotevalue, ns_localsqltimestamp, ns_parsesqldate, ns_parsesqltime, ns_parsesqltimestamp, ns_writecsv

DNS lookup commands

ns_addrbyhost, ns_hostbyaddr

File manipulation commands

ns_chmod, ns_cp, ns_ftruncate, ns_link, ns_mkdir, ns_mktemp, ns_normalizepath, ns_openexcl, ns_purgefiles, ns_rename, ns_rmdir, ns_rollfile, ns_symlink, ns_tmpnam, ns_truncate, ns_unlink

HTML manipulation commands

ns_formvalueput, ns_hrefs, ns_htmlselect, ns_quotehtml, ns_striphtml, ns_tagelement, ns_tagelementset

HTTP commands

ns_http, ns_httpget, ns_httpopen, ns_httppost

Image manipulation commands

ns_gifsize, ns_jpegsize

Internationalization (I18N) support commands

ns_charsets, ns_choosecharset, ns_cookiecharset, ns_encodingforcharset, ns_encodingfortype, ns_formfieldcharset, ns_setformencoding / ns_urlcharset

Logging commands

ns_accesslog, ns_log, ns_logctl, ns_logroll

Request authorization commands

ns_checkurl, ns_requestauthorize

Request processing commands

ns_register_adp, ns_register_cgi, ns_register_encoding, ns_register_filter_error, ns_register_fastpath, ns_register_filter, ns_register_filter_shortcut, ns_register_proc, ns_register_trace, ns_unregister_adp, ns_unregister_proc

Scheduling commands

ns_after, ns_atclose, ns_atexit, ns_atshutdown, ns_atsignal, ns_cancel, ns_pause, ns_resume, ns_schedule_proc, ns_schedule_daily, ns_schedule_weekly, ns_shutdown, ns_unschedule_proc

Server configuration commands

ns_config, ns_configsection, ns_configsections, ns_library, ns_limits, ns_modulepath, ns_param, ns_pools, ns_section

Server introspection commands

ns_driver, ns_env, ns_info, ns_server, ns_stats (3.x only, defunct in 4.0+)

Socket I/O commands

ns_sock, ns_sockaccept, ns_sockblocking, ns_sockcallback, ns_sockcheck, ns_sockclose, ns_sockdup, ns_sockerrno, ns_socketpair, ns_sockioctl, ns_socklisten, ns_socklistencallback, ns_socknbclose, ns_socknonblocking, ns_socknread, ns_sockopen, ns_sockpair, ns_sockreadwait, ns_sockselect, ns_socksend, ns_sockstrerror

Tcl channel management commands

ns_chan, ns_cleanupchans, ns_getchannels

Tcl interpreter management commands

ns_cleanup, ns_eval, ns_interp_ctl (4.5+) / ns_ictl (4.0), ns_init, ns_loop_ctl, ns_markfordelete, ns_reinit

Time commands

ns_fmttime, ns_gmtime, ns_httptime, ns_localtime, ns_parsehttptime, ns_parsetime, ns_time

Uncategorized

ns_cpfp, ns_crypt, ns_getcsv, ns_geturl, ns_guesstype, ns_isformcached, ns_issmallint, ns_paren, ns_parseheader, ns_parsequery, ns_rand, ns_resetcachedform, ns_sendmail, ns_sleep, ns_sourceproc, ns_url2file, ns_urldecode, ns_urlencode, ns_uudecode, ns_uuencode, ns_zlib