realbasic-nug
[Top] [All Lists]

Nonblocking StdIn?

To: REALbasic NUG <realbasic-nug at lists dot realsoftware dot com>
Subject: Nonblocking StdIn?
From: jon pipitone <jon dot pipitone at utoronto dot ca>
Date: Tue, 31 Jan 2006 15:31:25 -0500
Delivered-to: realbasic-nug at lists dot realsoftware dot com
Hey folks,

I'm currently writing a console application and I'd like to be able to get input from the user yet not have the application block if there's no input available. From what I read, there's no way to query StdIn to discover if there are any characters waiting, and calls to read() and readline() block.

So, what do others do? The language reference mentions the possibility of converting stdin to a socket like so:

    Dim Incoming as TCPSocket = Stdin

but I can't seem to retrieve data from the socket's read/readall methods. I'm running this all on Windows for the moment.

jp
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>


<Prev in Thread] Current Thread [Next in Thread>