16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
|
set x hello
if {[catch {read $chan 1024} data]} {
puts stderr "EOF ($data)"
catch {close $chan}
return
}
if {$verbose && $data != ""} {
puts -nonewline stderr $data
}
if {[eof $chan]} { ;# client gone or finished
puts stderr "EOF"
close $chan ;# release the servers client channel
return
}
|
|
|
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
|
set x hello
if {[catch {read $chan 1024} data]} {
puts stderr "EOF ($data)"
catch {close $chan}
return
}
if {$verbose && $data ne ""} {
puts -nonewline stderr $data
}
if {[eof $chan]} { ;# client gone or finished
puts stderr "EOF"
close $chan ;# release the servers client channel
return
}
|