Checking socket stream data availability
BlitzMax Forums/BlitzMax Programming/Checking socket stream data availability
| ||
I can't seem to find a function for testing if there's data available on a stream. Can I use readavail() directly on the socket and then use the stream read functions? |
| ||
Try SocketReadAvail(sock) |
| ||
Hi, Oops, looks like we're missing a 'SocketStreamSocket:TSocket()' function there - will fix. In the meantime, there's an undocumented 'Socket()' method in SocketStream you can use, eg: avail=SocketReadAvail( sockStream.Socket() ) |
| ||
Thanks. I know about the "hidden function", but it would be nice if you could check the stream like in Blitz3D/+ :) |