[REBOL] [BUG?] read-io & write-io or Wait or is TCL better?
From: Rebolinth:nodep:dds:nl at: 24-Dec-2003 22:30
Hello All / RT,
Im encoutering a strange behaviour using read-io / write-io.
linux core & view (any release)
I build a "tunnel" application in Rebol over tcp ports and use read-io write-io
to transport the data over the ports.
telnet, web, ftp everything runs fine over the tunnel except for SSH!!!
Ssh drops me out with the error "Bad packet length"...
Now i have checked the bug reports at openssh and indeed there are some issues
related to this, but its NOT the SSH i found out finaly, it looks like it is the
behaviour of the lowlevel read-io and write-io, but DONT ask me what it is, i
cant find it.
Why i think its a rebol bug?
I have build a tool under TCL and it does exaclty the same as the rebol tool,
expect the TCL one works with NO errors?! (dammmm :)
Although TCL uses Fileevents and I use a rebol 'wait. Also the TCL code uses
the same port configuration as rebol port:
Non blocking and Non buffering and Binary.
Why does TCL work and REBOL not?
The only thing i could find basicly is the difference between porthandling the DATA.
Tcl has the ability to manipulate data as is receives or sents (UTF8 etc...)
(thats off in my tcl application)
And tcl uses fileevents, while rebol uses wait. (not quiet the same though)
Question #2:
Somewhere during the transmition of the data and the receiption of the
data the data is mixed!! (not deliverd in the right order!!!) because when i count
pachages the sent and receive are always the same. (cant check the content
thought!!) Also ssh uses 3des and or blowfish, so the session is cripted.
PS: (Please dont advice me to look at ssh bugreport My tcl application works fine!)
Ooo yes some code...
I use read-io write-io like this
while [ positive? size: read-io INCOMING buffer bufsize ] [
write-io OUTGOING size
]
The selection on ports is done by a "wait [ 0 one two ]"
But the above work alll fine with ftp telnet web..anything...
Ooo yes.. i changed several times the bufsize but no effect...
?? Lowlevel Big-endian perhpas???
Hope someone has an idea???
(R)egards,
Norman
--
Conversation/lunch: "How do you Eat your Rebol in the Morning?"