Re: fileevent not working with serial
- From: Ralf Fassel <ralfixx@xxxxxx>
- Date: Tue, 31 Oct 2006 18:07:05 +0100
* "Jason Sheets" <jason.sheets@xxxxxx>
| I've tried adding the fileevent before and after the proc to no
| avail.
Should not make a difference since the filevent only triggers when TCL
becomes idle.
| proc serial_receiver { chan } {
| if { [eof $chan] } {
| puts stderr "Closing $chan"
| catch {close $chan}
| return
| }
| set data [read $chan]
| set size [string length $data]
| puts "received $size bytes: $data"
Apart from the obvious missing close brace for the proc this should
work...
You also need to make sure that the output at the writing end of the
serial port is unbuffered and flushed properly.
R'
.
- Follow-Ups:
- Re: fileevent not working with serial
- From: Jason Sheets
- Re: fileevent not working with serial
- References:
- fileevent not working with serial
- From: Jason Sheets
- fileevent not working with serial
- Prev by Date: Re: aolserver compile errors pasted, configure works, make install bombenz!
- Next by Date: Re: http://aolserver.com/lists.php why is aolsever mailing list done in php?
- Previous by thread: fileevent not working with serial
- Next by thread: Re: fileevent not working with serial
- Index(es):