WriteString bug???

BlitzPlus Forums/BlitzPlus Programming/WriteString bug???

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

A method that polls a stream for arrival of a complete string with the ReadAvail (to avoid blocking) would be even more complicated than your example code above.

Currently the presence of 4 bytes available on the incoming stream guarantees you can read the string length without blocking.

That's true. You'd have to wait for one byte available, read it, and then decide if you have to wait any longer for the next 1-4 bytes. It's an extra step from what you have to do now, but not a very CPU intensive one. Not too hard to code though if you know the string format?