Re: Implementing a sockets address family

Nivedita Singhvi (nivedita@us.ibm.com)
Mon, 8 Jul 2002 11:29:01 -0700


> Hi,
> thanks for the reply. From an application point of view, when a
> socket is created it is non-blocking by default. If the application uses
> ioctl or fcntl to set the socket to non-blocking mode, then all I was
saying
> was I don't see any indication in flags or msghdr->flags as to whether
the
> user wants to wait for the recv to complete or not. How is my recvmsg()
> function in my implementation of the new address family supposed to
> differentiate. I cannot see any reference to O_NONBLOCK or
> MSG_DONTWAIT in the tcp_recvmsg() function.

If its non blocking, nonblock is 1, and the function sock_rcvtimeo()
sets timeo to 0. If there isnt any data to read, copied is set to -EAGAIN,
we break out of the big do loop, pretty much fall through the rest of the
function and return copied.

thanks,
Nivedita

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/