Artifact
d9bb7694fb0bcdb4fa501f175421fb3db759f409:
Attachment "server.tcl" to
ticket [2827000fff]
added by
andreas_kupries
2009-07-29 06:20:02.
proc conn {s args} {
puts "<$s> $args"
fconfigure $s -buffering line
after 3000 [list hello $s]
}
proc hello {s} {
puts hello
puts $s hello-world
after 3000 [list empty $s]
}
proc empty {s} {
puts empty
puts $s {}
after 3000 [list more $s]
}
proc more {s} {
puts more
puts $s more-lines
after 3000 [list another $s]
}
proc another {s} {
puts another
puts $s another-line
after 3000 exit_
}
proc exit_ {} {
puts exit
exit
}
socket -server conn 7777
vwait forever