IOStream ReadAvail() ?

BlitzMax Forums/BlitzMax Programming/IOStream ReadAvail() ?

Hezkore(Posted 2013) [#1]
I'm trying to read brl.standardio.StandardIOStream with ReadLine() and it's working just fine, except for the fact that the whole application pauses until there actually is something to read.
So basically I'm in need for ReadAvail() in brl.standardio.StandardIOStream, anyone know a solution for this?


GfK(Posted 2013) [#2]
I presume you're trying to read a file from a remote server?

SocketReadAvail() is probably what you need, but if you're not using sockets already then you'll need to do a little work to convert your current code. 'Fraid I don't know the ins and outs of sockets to be offering a code example, though.


Hezkore(Posted 2013) [#3]
It's actually from the standard IO stream I'm trying to read, nothing network related.
I'm starting this application via TFreeProcess and writes to its pipe, and now I'm trying to read it in the launched app via brl.standardio.StandardIOStream.ReadLine() but it halts until there is something to read.

Last edited 2013


Henri(Posted 2013) [#4]
Hello,

I have something of the sort. Modify it to suit your needs



-Henri

Last edited 2013