[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

Reply via email to