fconfigure windows vs linux
Hi,
I have a peace of code which works as wanted on windows, but when I
try it on linux it stops working.
set s [socket host.com 8200]
fconfigure $s -buffering none -blocking 0 -translation auto
proc reportVersion {chan} {
puts "triggered"
if {[gets $chan line] < 0} {
if {[eof $chan]} {
close $chan
return
}
} else {
puts $line
}
}
fileevent $s readable[list reportVersion $s]
puts -nonewline $s "command"
after 2000
gets $s
on windows the reply is caught by the fileevent, but on linux is the
gets $s gets the message.
How do I get fileevent to catch the reply in linux?
|