![]() |
![]() ![]() ![]() ![]() |
The following Tcl functions are new or have been modified for Version 2.3:
Connection ID argument is now optional for all Tcl API functions: The connId argument is now optional for all Tcl API functions that used it. The affected functions are: ns_browsermatch, ns_conn, ns_respond, ns_return, ns_setexpires, ns_write, and ns_writecontent. The conn argument is now also optional in procedures registered by ns_register_proc and ns_register_filter. For backwards compatibility, the connection ID arguments can still be specified in the above situations, but they are considered obsolete. | Tcl Developer's Guide: page 84, page 95, page 175, page 179, page 186, page 187, page 205, page 248 and page 249 |
New Unix wrapper Tcl functions: The following new Tcl functions have been added which are Unix wrapper functions: ns_chmod, ns_ftruncate, ns_socketpair, ns_symlink, and ns_truncate. The ns_link function, which existed previously but was not documented, is also included. | Tcl Developer's Guide: page 92, page 123, page 147, page 213, page 223, and page 235 |
The ns_adp_include and ns_adp_parse functions have been enhanced to allow you to pass arguments to the ADP and to specify whether any Tcl in the ADP should be evaluated locally or globally. | |
The ns_register_adptag has been changed so that it cannot be called after the server has started. It must be called in a script in a server's Tcl directory so that it can be initialized at server startup time. | Tcl Developer's Guide: page 174 |
Three new Tcl functions have been added for use within ADPs to allow you to work with arguments that have been passed into the ADP: ns_adp_argc returns the number of passed-in arguments. ns_adp_argv returns the value of a passed-in argument. ns_adp_bind_args binds the passed-in arguments to variable names. | |
New ns_atclose Tcl function: This Tcl function allows you to register a function to be run when the current connection ends. | Tcl Developer's Guide: page 81 |
Enhanced ns_atshutdown and ns_atsignal Tcl functions: These two functions allow you to specify procedures with or without arguments at the specified event. | |
New ns_cache Tcl function: The ns_cache function allows you to create, destroy, modify, and evaluate entries in the Tcl cache. | Tcl Developer's Guide: page 88 |
New argument added to ns_config Tcl function: A new "default" argument has been added to allow you to specify a default value for the parameter if it is not set in the configuration file. | Tcl Developer's Guide: page 94 |
New ns_conn close Tcl function: This function allows you to close the connection so processing can take place without making the client wait. | Tcl Developer's Guide: page 95 |
Enhanced ns_cp Tcl function: This function now has a -preserve switch to specify that the copied file retains the date, time, and mode of the original file. | Tcl Developer's Guide: page 97 |
Enhanced ns_db gethandle Tcl function: This function now allows you to specify a timeout for getting the database handles or that it will be non-blocking. | Tcl Developer's Guide: page 101 |
New ns_fmttime Tcl function: This function allows you to return a formatted date and time. | Tcl Developer's Guide: page 120 |
Newly-documented ns_getcsv Tcl function: This function reads a line of CSV data from the specified file. | Tcl Developer's Guide: page 124 |
New ns_getform Tcl function: This function returns an ns_set that contains all of the query data that was part of the HTTP request | Tcl Developer's Guide: page 125 |
Obsolete ns_get_multipart_formdata Tcl function: This function is supported only for backwards compatibility. It still requires the conn argument and is superceded by the ns_getform, ns_queryexists, and ns_queryget functions. | Tcl Developer's Guide: page 126 |
New ns_gifsize Tcl function: This function determines the width and height of a GIF file. | Tcl Developer's Guide: page 128 |
New ns_queryexists Tcl function: This function checks for a key in the query data that was part of the HTTP request. | Tcl Developer's Guide: page 168 |
New ns_queryget Tcl function: This function gets a value from the query data that was part of the HTTP request. | Tcl Developer's Guide: page 169 |
New ns_queryresolve Tcl function: This function implements a subset of the nslookup functions. | Tcl Developer's Guide: page 171 |
New ns_quota Tcl function: This Tcl function allows you to check on the pageroot quotas. | Tcl Developer's Guide: page 172 |
New ns_register_adptag Tcl function: This function allows you to register your own tags that can then be used within ADPs. | Tcl Developer's Guide: page 174 |
New ns_rwlock Tcl function: This function allows you to create, destroy, and manipulate read/write locks. | Tcl Developer's Guide: page 190 |
Enhanced ns_schedule_daily, ns_schedule_proc, and ns_schedule_weekly Tcl functions: These three functions now allow you to specify procedures with or without arguments at the specified event. | |
Enhanced ns_sendmail Tcl function: The ns_sendmail function can now accept multiple recipients, including BCC recipients. | Tcl Developer's Guide: page 199 |
Enhanced ns_server Tcl function: The lists returned by ns_server have been extended to include the number of bytes sent through the connection. | Tcl Developer's Guide: page 200 |
New ns_set_precision Tcl function: This function can be used to set the precision of floating-point to string conversions. This function replaces the tcl_precision variable which is not recognized by expr. | Tcl Developer's Guide: page 206 |
New ns_updateheader Tcl function: This function allows you to change an entry in the output headers. | Tcl Developer's Guide: page 240 |
New and enhanced ns_user Tcl function: The new ns_user homedir function allows you to determine a user's home directory. The ns_user add and ns_user update functions have been enhanced to allow you to specify a home directory for the user. | Tcl Developer's Guide: page 246 |
New ns_writefp Tcl function: This function writes the contents of a file to the connection. | Tcl Developer's Guide: page 250 |