Nsproxy

From AOLserver Wiki
Revision as of 13:06, 31 January 2009 by Gustafn (talk | contribs) (New page: '''NAME''' : ns_proxy - Set connection to streaming state for streaming content via ns_write '''SYNOPSIS''' : '''ns_proxy''' ''option ?arg arg ...?'' '''DESCRIPTION''' : This command ...)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

NAME

ns_proxy - Set connection to streaming state for streaming content via ns_write

SYNOPSIS

ns_proxy option ?arg arg ...?

DESCRIPTION

This command provides a simple, robust proxy mechanism to evaluate Tcl scripts in a separate, pipe-connected process. This approach can be useful both to isolate potentially thread-unsafe code outside the address space of a multithreaded process such as NaviServer or to enable separation and timeout of potentially misbehaving, long running scripts.
The legal options are:
  • ns_proxy get poolname ? -handles value? ? -timeout value?
Returns one or more handles to proxies from the specified pool. The pool will be created with default options if it does not already exist. The option -handle can be used to specify the number of handles allocated (default: 1). The option timeout specifies the maximum amount of time in milliseconds to wait for the handles to become available before raising an error. Requesting more than one handle in a single call (if more than one handle is required) is necessary as it is an error to request handles from a pool from which handles are already owned by the thread. This restriction is implemented to avoid possible deadlock conditions. The handle returned by this command can be used as a scalar value for other ns_proxy commands, or it can be used as Tcl command itself (see ns_proxy eval for more information).
  • ns_proxy release handle
Returns a list of attribute value pairs of the actual configuration and runtime values for the specified pool. The values can be set with the Tcl command array set. The command returns values for the following attributes minthreads, maxthreads, idle, current, maxconns, queued, timeout and spread
  • ns_pools list
Returns a list of the configured pools
  • ns_pools register pool server method url
Register pool for requests issued to the specified server, HTTP method and url

EXAMPLES

ns_pools get default

SEE ALSO

ns_limits