Artifact
db5ddff1fc36483aad199819e5aa4dc9afa945d8:
Attachment "sockettest.tcl" to
ticket [3295154fff]
added by
mb-austin
2011-04-30 05:34:42.
proc doit {{count 1} {max 10}} {
puts stdout "$count -- start CLIENT "
socket localhost 4444
if {$count == $max} {
after 3000 {set ::forever 0}
return
}
incr count
after idle [list doit $count $max]
#doit $count $max
}
set connection_count 0
proc connect {args} {
incr ::connection_count
puts stdout "$::connection_count -- SERVER -- connect from $args"
}
socket -server connect 4444
after idle doit
vwait forever
puts stdout "total connections: $connection_count"