Okay, thanks for the info. I see now I made an error in my program :$. This is the solution I have conjured and it works:
proc readcommand {s} {
set command ""
# just need a character other than | :)
set char c
while {$char != "|"} {
set char [read $s 1]
append command...
Hi,
I'm trying to make a client for the DC protocol using Tcl/Tk. The major problem is that this protocol doesn't send endlines, but rather the | character to end a command.
This poses great problems. For one, 'gets' will always return an empty string, and 'read' will block when reading more...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.