Artifact
77ed756c4ca5143ac564af253881c7ab19161215:
Attachment "srv.tcl" to
ticket [1028264fff]
added by
ferrieux
2008-11-09 04:17:58.
if {$argc!=1} {puts stderr "Usage: srv.tcl <inipause>";exit 1}
set dt [lindex $argv 0]
proc pause t {
if {!$t} return
puts PAUSE:$t
after $t
}
proc insok {sok args} {
set ::s $sok
}
socket -server insok 1111
vwait s
puts GOT-CLIENT
fconfigure $s -buffering line
pause $dt
gets $s line
puts RCV:$line
pause 1000
if {[catch {puts $s YOYODYNE} err]} {
puts ERR:$err
set rest [read $s]
puts REST:$rest
} else {
puts NOLUCK
}