Tom Jackson wrote:
>
> The docs for ns_sockcallback has this example:
>
> set sock [ns_socklisten * 9000]
> ns_sockcallback $sock newconn r
>
> # Keep $sock from closing after connection ends
> detach $sock
>
> # When a connection arrives, newconn will be called as:
> # newconn $sock r
>
> proc newconn {sock when} {
>     set fds [ns_sockaccept $sock]
>     set rfd [lindex $fds 0]
>     set wfd [lindex $fds 1]
>     puts $wfd "Hello!"
>     close $rfd
>     close $wfd
> }

you can't do it anymore. rob mayoff has a version of detach at
www.dqd.com

personally, i had problems trying to use it myself
(it would cause crashes)
but it seems to work for others..

Reply via email to