Dan,
I did try to write a version using select() but it stopped everything
while waiting on the select. I agree that java lacks select(). It would
be great if you could get a version of select under java. Alternatively
if I could stop select blocking all threads ......
Dave
> [EMAIL PROTECTED] wrote:
> > The major thing I have done with ioctls() is to do a nonblocking
read
> > FIONREAD which also returns the number of bytes available for
reading. I
> > could not find a similar function using termios. I can't think of a
way
> > to avoid this. (I would actually like to go even lower and use
> > interrupts for notification as the polling is wasteful of
resources.)
>
> Would select() be applicable?
>
> (This is the greatest functions for doing I/O
> efficiently; you can sleep the current thread
> until any of a number of file descriptors has
> i/o ready for you. Java suffers greatly from
> its absence. It's the key to implementing
> truly monsterously high performance web
> servers and the like, where the number of
> clients far exceeds the number of available
> threads.)
> - Dan
>