Greg wrote:

> Would I be right in thinking that you can setup a signal handler for
> notification of received data on a non blocking socket ?
> And could you do something similar for a character device ?

If you enable async I/O, with:

        int one = 1;

        if (ioctl(fd, FIOASYNC, &one) < 0)
        {
                perror("ioctl(FIOASCYNC)");
                return 1;
        }

you will receive SIGIO whenever there is data available.

-- 
Glynn Clements <[EMAIL PROTECTED]>

-
To unsubscribe from this list: send the line "unsubscribe linux-net" in
the body of a message to [EMAIL PROTECTED]

Reply via email to