On Fri, 16 Jun 2000, #ZHU MING# wrote:
>
> Hi,
>
> If O_NONBLOCK is not set on the socket's file descriptor,
> recvfrom() blocks until a message arrives. If no messages are
> available at the socket and O_NONBLOCK is set on
> the socket's file descriptor, recvfrom() fails and sets errno to EAGAIN.
>
> But how to set 0_NONBLOCK on the socket's file descriptor?
>
You may use select() to accomplish non-blocking recvfrom(). You may set
the timer for how long you want the select to wait for the message and
then select times out if there is no message till the timer expires.
--
-
To unsubscribe from this list: send the line "unsubscribe linux-net" in
the body of a message to [EMAIL PROTECTED]