14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
|
#
proc reflectCB {chan {verbose 0}} {
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
}
|
|
|
|
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
|
#
proc reflectCB {chan {verbose 0}} {
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
}
|