https://panoptic.com/mediawiki/aolserver/index.php?title=Ns_register_proc&feed=atom&action=historyNs register proc - Revision history2024-03-28T11:44:47ZRevision history for this page on the wikiMediaWiki 1.34.2https://panoptic.com/mediawiki/aolserver/index.php?title=Ns_register_proc&diff=5696&oldid=prevDossy: Reverted edits by HelenArchibald (Talk) to last revision by Umbrella132010-03-15T14:19:30Z<p>Reverted edits by <a href="/wiki/aolserver/Special:Contributions/HelenArchibald" title="Special:Contributions/HelenArchibald">HelenArchibald</a> (<a href="/mediawiki/aolserver/index.php?title=User_talk:HelenArchibald&action=edit&redlink=1" class="new" title="User talk:HelenArchibald (page does not exist)">Talk</a>) to last revision by <a href="/mediawiki/aolserver/index.php?title=User:Umbrella13&action=edit&redlink=1" class="new" title="User:Umbrella13 (page does not exist)">Umbrella13</a></p>
<table class="diff diff-contentalign-left" data-mw="interface">
<col class="diff-marker" />
<col class="diff-content" />
<col class="diff-marker" />
<col class="diff-content" />
<tr class="diff-title" lang="en">
<td colspan="2" style="background-color: #fff; color: #222; text-align: center;">← Older revision</td>
<td colspan="2" style="background-color: #fff; color: #222; text-align: center;">Revision as of 14:19, 15 March 2010</td>
</tr><tr><td colspan="2" class="diff-lineno" id="mw-diff-left-l27" >Line 27:</td>
<td colspan="2" class="diff-lineno">Line 27:</td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> ns_register_proc GET /foo/bar/hmm Cproc</div></td><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> ns_register_proc GET /foo/bar/hmm Cproc</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"></td><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"></td></tr>
<tr><td class='diff-marker'>−</td><td style="color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div>: Aproc will be called when the requested URL is exactly /foo/bar. Bproc will be called when the requested URL is below /foo/bar, provided there is not already another procedure registered to be called for that exact URL or for an URL with a closer match. Cproc (not Bproc) will be called when the requested URL is equal to or below /foo/bar/hmm. Syntax for the registered procedure The conn (connection) argument is optional for procedures registered by '''ns_register_proc''' if the procedure has 0 or 1 arguments (not including conn). The following examples show the variations that can be used in this case:</div></td><td class='diff-marker'>+</td><td style="color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div>: Aproc will be called when the requested URL is exactly /foo/bar. Bproc will be called when the requested URL is below /foo/bar, provided there is not already another procedure registered to be called for that exact URL or for an URL with a closer match. Cproc (not Bproc) will be called when the requested URL is equal to or below /foo/bar/hmm. Syntax for the registered procedure The conn (connection) argument is optional for procedures registered by '''ns_register_proc''' if the procedure has 0 or 1 arguments (not including conn). The following <ins class="diffchange diffchange-inline">[http://www.umbrellaonline.com real estate] </ins>examples show the variations that can be used in this case:</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"></td><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> ns_register_proc GET /noargs noargs</div></td><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> ns_register_proc GET /noargs noargs</div></td></tr>
</table>Dossyhttps://panoptic.com/mediawiki/aolserver/index.php?title=Ns_register_proc&diff=5305&oldid=prevGustafn at 19:54, 7 February 20092009-02-07T19:54:49Z<p></p>
<table class="diff diff-contentalign-left" data-mw="interface">
<col class="diff-marker" />
<col class="diff-content" />
<col class="diff-marker" />
<col class="diff-content" />
<tr class="diff-title" lang="en">
<td colspan="2" style="background-color: #fff; color: #222; text-align: center;">← Older revision</td>
<td colspan="2" style="background-color: #fff; color: #222; text-align: center;">Revision as of 19:54, 7 February 2009</td>
</tr><tr><td colspan="2" class="diff-lineno" id="mw-diff-left-l66" >Line 66:</td>
<td colspan="2" class="diff-lineno">Line 66:</td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>: [[ns_unregister_proc]]</div></td><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>: [[ns_unregister_proc]]</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"></td><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"></td></tr>
<tr><td class='diff-marker'>−</td><td style="color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div>[[Category:Core Tcl API]]</div></td><td class='diff-marker'>+</td><td style="color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div><ins class="diffchange diffchange-inline">[[Category:Documentation]] </ins>[[Category:Core Tcl API]]</div></td></tr>
</table>Gustafnhttps://panoptic.com/mediawiki/aolserver/index.php?title=Ns_register_proc&diff=4439&oldid=prevDossy at 00:46, 2 December 20052005-12-02T00:46:40Z<p></p>
<table class="diff diff-contentalign-left" data-mw="interface">
<col class="diff-marker" />
<col class="diff-content" />
<col class="diff-marker" />
<col class="diff-content" />
<tr class="diff-title" lang="en">
<td colspan="2" style="background-color: #fff; color: #222; text-align: center;">← Older revision</td>
<td colspan="2" style="background-color: #fff; color: #222; text-align: center;">Revision as of 00:46, 2 December 2005</td>
</tr><tr><td colspan="2" class="diff-lineno" id="mw-diff-left-l1" >Line 1:</td>
<td colspan="2" class="diff-lineno">Line 1:</td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>{{manpage|ns_proc}}</div></td><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>{{manpage|ns_proc}}</div></td></tr>
<tr><td class='diff-marker'>−</td><td style="color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div><del style="font-weight: bold; text-decoration: none;"></del></div></td><td colspan="2"> </td></tr>
<tr><td class='diff-marker'>−</td><td style="color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div><del style="font-weight: bold; text-decoration: none;">----</del></div></td><td colspan="2"> </td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"></td><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>'''NAME'''</div></td><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>'''NAME'''</div></td></tr>
</table>Dossyhttps://panoptic.com/mediawiki/aolserver/index.php?title=Ns_register_proc&diff=4322&oldid=prevDossy: remove duplicate copy text, cleanup formatting, add category link2005-10-13T04:04:50Z<p>remove duplicate copy text, cleanup formatting, add category link</p>
<a href="https://panoptic.com/mediawiki/aolserver/index.php?title=Ns_register_proc&diff=4322&oldid=4321">Show changes</a>Dossyhttps://panoptic.com/mediawiki/aolserver/index.php?title=Ns_register_proc&diff=4321&oldid=prev67.53.128.200 at 22:29, 12 October 20052005-10-12T22:29:53Z<p></p>
<table class="diff diff-contentalign-left" data-mw="interface">
<col class="diff-marker" />
<col class="diff-content" />
<col class="diff-marker" />
<col class="diff-content" />
<tr class="diff-title" lang="en">
<td colspan="2" style="background-color: #fff; color: #222; text-align: center;">← Older revision</td>
<td colspan="2" style="background-color: #fff; color: #222; text-align: center;">Revision as of 22:29, 12 October 2005</td>
</tr><tr><td colspan="2" class="diff-lineno" id="mw-diff-left-l1" >Line 1:</td>
<td colspan="2" class="diff-lineno">Line 1:</td></tr>
<tr><td class='diff-marker'>−</td><td style="color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div>Man page: http://aolserver.com/<del class="diffchange diffchange-inline">docs</del>/tcl/<del class="diffchange diffchange-inline">ns_register_proc</del>.html</div></td><td class='diff-marker'>+</td><td style="color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div>Man page: http://aolserver.com/<ins class="diffchange diffchange-inline">man/4.0</ins>/tcl/<ins class="diffchange diffchange-inline">ns_proc</ins>.html</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"></td><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>----</div></td><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>----</div></td></tr>
</table>67.53.128.200https://panoptic.com/mediawiki/aolserver/index.php?title=Ns_register_proc&diff=2892&oldid=prevWikiSysop: imported from WiKit id 1862005-07-14T20:10:17Z<p>imported from WiKit id 186</p>
<p><b>New page</b></p><div>Man page: http://aolserver.com/docs/tcl/ns_register_proc.html<br />
<br />
----<br />
<br />
'''NAME'''<br />
<br />
: ns_register_proc - Register a procedure for a method/URL combination<br />
<br />
'''SYNOPSIS'''<br />
<br />
: '''ns_register_proc''' ''?-noinherit?'' method URL myproc ''?args?''<br />
<br />
'''DESCRIPTION'''<br />
<br />
: '''ns_register_proc''' registers the procname to handle<br />
: the specified method/URL combination. When the<br />
: server gets a matching request, it calls procname<br />
: with the connection id and any arguments specified<br />
: here.<br />
<br />
: If ''-noinherit'' is specified, the requested URL must<br />
: match the specified URL exactly. For example, if<br />
: the URL specified with '''ns_register_proc''' is<br />
: /foo/bar, procname will not be called unless the<br />
: requested URL is exactly /foo/bar.<br />
<br />
: If ''-noinherit'' is not specified, the requested URL<br />
: can match the specified URL or any URL below it.<br />
: For example, if the URL specified with '''ns_register_proc''' <br />
: is /foo/bar, procname will be called for<br />
: /foo/bar, /foo/bar/hmm, and any other URL below<br />
: /foo/bar, provided there is not already another<br />
: procedure registered for that exact URL or for an<br />
: URL with a closer match.<br />
<br />
: Note that you must use a glob-style matching character <br />
: if you want inheritance for file names. For<br />
: example, if you want /foo/bar to match<br />
: /foo/bar.html, you must use: <br />
<br />
ns_register_proc /foo/bar*<br />
<br />
: You can register two procedures for any given<br />
: method/URL combination by calling '''ns_register_proc'''<br />
: once with the ''-noinherit'' flag set and once without<br />
: it. Only one of the procedures will be called for<br />
: any given request, depending on whether the URL was<br />
: an exact match or not. For example:<br />
<br />
ns_register_proc -noinherit GET /foo/bar Aproc<br />
ns_register_proc GET /foo/bar Bproc<br />
ns_register_proc GET /foo/bar/hmm Cproc<br />
<br />
: Aproc will be called when the requested URL is<br />
: exactly /foo/bar. Bproc will be called when the<br />
: requested URL is below /foo/bar, provided there is<br />
: not already another procedure registered to be<br />
: called for that exact URL or for an URL with a<br />
: closer match. Cproc (not Bproc) will be called when<br />
: the requested URL is equal to or below<br />
: /foo/bar/hmm. Syntax for the registered procedure<br />
: The conn (connection) argument is optional for procedures <br />
: registered by ns_register_proc if the procedure has <br />
: 0 or 1 arguments (not including conn).<br />
: The following examples show the variations that can<br />
: be used in this case:<br />
<br />
ns_register_proc GET /noargs noargs<br />
ns_register_proc GET /context context fnord<br />
ns_register_proc GET /conncontext conncontext greeblev<br />
<br />
proc noargs { } {<br />
ns_returnnotice 200 "noargs"<br />
} ;# noargs<br />
<br />
proc context { context } {<br />
ns_returnnotice 200 "context is $context"<br />
} ;# context<br />
<br />
proc conncontext { conn context } {<br />
ns_returnnotice 200 "conncontext is $context"<br />
} ;# conncontext<br />
<br />
: The conn (connection) argument is required for procedures <br />
: registered by '''ns_register_proc''' if the procedure <br />
: has 2 or more arguments (not including<br />
: conn). The conn argument will be filled automatically <br />
: with the connection information. The first<br />
: argument following conn will always take the value<br />
: supplied by '''ns_register_proc''', if there is one, or<br />
: an empty value. All other arguments must supply a<br />
: default value. The following examples show the<br />
: variations that can be used in this case:<br />
<br />
ns_register_proc GET /twoargs twoargs fnord<br />
ns_register_proc GET /threeargs threeargs fnord fjord<br />
<br />
ns_register_proc -noinherit GET /foo/bar Aproc<br />
ns_register_proc GET /foo/bar Bproc<br />
ns_register_proc GET /foo/bar/hmm Cproc<br />
<br />
: Aproc will be called when the requested URL is<br />
: exactly /foo/bar. Bproc will be called when the<br />
: requested URL is below /foo/bar, provided there is<br />
: not already another procedure registered to be<br />
: called for that exact URL or for an URL with a<br />
: closer match. Cproc (not Bproc) will be called when<br />
: the requested URL is equal to or below<br />
: /foo/bar/hmm. Syntax for the registered procedure<br />
: The conn (connection) argument is optional for procedures <br />
: registered by '''ns_register_proc''' if the procedure <br />
: has 0 or 1 arguments (not including conn).<br />
: The following examples show the variations that can<br />
: be used in this case:<br />
<br />
ns_register_proc GET /noargs noargs<br />
ns_register_proc GET /context context fnord<br />
ns_register_proc GET /conncontext conncontext greeble<br />
<br />
proc noargs { } {<br />
ns_returnnotice 200 "noargs"<br />
} ;# noargs<br />
<br />
proc context { context } {<br />
ns_returnnotice 200 "context is $context"<br />
} ;# context<br />
<br />
proc conncontext { conn context } {<br />
ns_returnnotice 200 "conncontext is $context"<br />
} ;# conncontext<br />
<br />
: The conn (connection) argument is required for procedures <br />
: registered by ns_register_proc if the procedure has 2 <br />
: or more arguments (not including<br />
: conn). The conn argument will be filled automatically <br />
: with the connection information. The first<br />
: argument following conn will always take the value<br />
: supplied by ns_register_proc, if there is one, or<br />
: an empty value. All other arguments must supply a<br />
: default value. The following examples show the<br />
: variations that can be used in this case:<br />
<br />
ns_register_proc GET /twoargs twoargs fnord<br />
ns_register_proc GET /threeargs threeargs fnord fjord<br />
<br />
proc twoargs { conn context { greeble bork } } {<br />
# Do stuff...<br />
}<br />
<br />
proc threeargs { conn context {greeble bork } { hoover quark } {<br />
# Do stuff...<br />
}<br />
<br />
: When a GET of /twoargs is requested, the conn argument <br />
: will be filled automatically, the context<br />
: argument will be assigned "fnord" and the greeble<br />
: argument will be assigned the default value "bork".<br />
<br />
: When a GET of /threeargs is requested, the conn<br />
: argument will be filled automatically, the context<br />
: argument will be assigned "fnord" and the greeble<br />
: argument will be assigned "fjord", and the hoover<br />
: argument will be assigned the default value<br />
: "quark".</div>WikiSysop