Difference between revisions of "Nsproxy"

From AOLserver Wiki
Jump to navigation Jump to search
Line 29: Line 29:
 
: Releases any handles from any pools currently owned by a thread. This command is intended to be used as part of a garbage collection step.
 
: Releases any handles from any pools currently owned by a thread. This command is intended to be used as part of a garbage collection step.
  
* '''ns_proxy config''' ''poolname'' ''?'' '''-handles''' ''value?'' ''?'' '''-timeout''' ''value?''  
+
* '''ns_proxy config''' ''poolname'' ''?'' '''-init''' ''value? ?'' '''-reinit''' ''value? ?'' '''-min''' ''value? ?'' '''-max''' ''value? ?'' '''-exec''' ''value? ?'' '''-gettimeout''' ''value? ?'' '''-evaltimeout''' ''value? ?'' '''-sendtimeout''' ''value? ?'' '''-recvtimeout''' ''value? ?'' '''-waittimeout''' ''value?
  
 +
* '''ns_proxy ping'''
 +
 +
* '''ns_proxy active'''
 +
 +
* '''ns_proxy send'''
 +
 +
* '''ns_proxy wait'''
 +
 +
* '''ns_proxy recv'''
  
 
'''EXAMPLES'''
 
'''EXAMPLES'''

Revision as of 13:20, 31 January 2009

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
Release a single handle. All handles owned by a thread must be returned before any handles can be allocated again.
  • ns_proxy eval handle script ?timeout?
Evalutes script in the proxy specified by handle. The optional timeout argument specifies a maximum number of milliseconds to wait for the command to complete before raising an error.
  • ns_proxy cleanup
Releases any handles from any pools currently owned by a thread. This command is intended to be used as part of a garbage collection step.
  • ns_proxy config poolname ? -init value? ? -reinit value? ? -min value? ? -max value? ? -exec value? ? -gettimeout value? ? -evaltimeout value? ? -sendtimeout value? ? -recvtimeout value? ? -waittimeout value?
  • ns_proxy ping
  • ns_proxy active
  • ns_proxy send
  • ns_proxy wait
  • ns_proxy recv

EXAMPLES

ns_proxy get default

SEE ALSO

ns_limits