Ns socklistencallback

From AOLserver Wiki
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