Ns socklistencallback

From AOLserver Wiki
Revision as of 19:13, 27 September 2006 by Jhavard (talk | contribs) (ns_socklistencallback -- Run script on connect)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Man page: http://www.aolserver.com/docs/devel/tcl/api/conn.html#ns_socklistencallback


NAME

ns_socklistencallback -- Run script on connect

SYNOPSIS

ns_socklistencallback address port script

DESCRIPTION

Listen on the given port and address, calling script on connect. The called proc takes two arguments, the read channel id, and the write channel id.

EXAMPLES

   ns_socklistencallback * 7227 conn_handler
   
   proc conn_handler {rfd wfd} {
       puts $wfd "Welcome to the test server"
       gets $rfd line
       puts $wfd "Well isn't that nice"
   }

SEE ALSO

ns_socklisten, ns_sockcallback

Category Documentation - Category Core Tcl API