W3C home > Mailing lists > Public > www-lib@w3.org > April to June 1999

Re: The tiny web browser

From: Henrik Frystyk Nielsen <frystyk@w3.org>
Date: Tue, 18 May 1999 17:24:33 -0400
To: www-lib@w3.org
Message-ID: <3741DA91.7B05392C@w3.org>
To: Neil Stewart <nstewart@cadence.com>
Neil Stewart wrote:
> 
> Hi all,
> 
> Well, I've finally got libwww to compile under pSOS, along with
> the 'tiny' web browser. Now, I can download files from my web
> server and see them no problem, but I can't work out how to get
> console input back to the application (for selecting links).
> 
> As far as I can make out from reading Unix man pages etc,
> STDIN_FILENO is a socket descriptor (in the same terminology as
> TCP/IP sockets) for standard input (stdin), and the tiny browser
> registers an event handler on this socket.  Is this correct, or
> have I totally misunderstood how the event handler works?
> 
> pSOS wont allow me to use STDIN_FILENO as a socket descriptor for
> stdin (indeed it doesn't even define STDIN_FILENO). However, I
> can check stdin for the availability of characters. So, my main
> question is: do I need to go into the heart of the libwww event
> loop and add a specific check for input on stdin if I want to
> process user input? Or would it be easier to ignore the event
> handler and write my own?

I am not sure - I have the same problem on NT where a console app like
the tiny browser for some reason can't register stdin even though it is
in fact defined as a socket.

Despite doing something like polling I am not sure what to do except
rolling your own. if you want to do polling then you can register an
event handler with a timeout of, say 100 ms - just to see if that works.

Henrik
Received on Tuesday, 18 May 1999 17:24:38 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 23 April 2007 18:18:29 GMT