recv return constraints
If you call recv() to fetch data, the syscall will block if nothing happens. But what are the constraints for tcp_recvmsg() to return? This posting focus on the major factors (other aspects like OOB data, signals, non-blocking IO is ignored in this posting): Timeout Amount of data tcp_recvmsg() first calculate the timeout for this function via sock_rcvtimeo(). This refers to return noblock ? 0 : sk->sk_rcvtimeo - in the common therefore sk->sk_rcvtimeo....