Mailing List Archive: 49091 messages
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search
 

[REBOL] Re: [BUG?] read-io & write-io or Wait or is TCL better?

From: petr:krenzelok:trz:cz at: 6-Aug-2003 23:15

Andrew Martin wrote:
>Norman wrote: > >>I use read-io write-io like this >> >> > >>while [ positive? size: read-io INCOMING buffer bufsize ] [ >> write-io OUTGOING size >>] >> >> > >For 'read-io, the buffer size must be larger than the size of the data >coming in! > >For example, in my Wiki (and Mesh) scripts, I use this: > Query_String: make string! 2 + > Length: to integer! Rebol/options/cgi/content-length > read-io Rebol/ports/input Query_String Length > >I'd suggest you use something like: > >buffer: make string! 2 + bufsize >while [ positive? size: read-io INCOMING buffer bufsize ] [ > write-io OUTGOING size >] > >And that should cure your problems! :) >
Andrew, either you are able to explain it, or it should be regarded bug imo! That is not the only issue with rebol handling packets, I e.g. found difference between using open/direct/no-wait and open/direct/no-wait/binary ... simply talking to our device, if I don't use /binary refinement, exactly the same loop is quit and rebol refuses to wait .... I even watched packets and from the device pov everything was just exactly the same in our case .... -pekr-