开发者

Does SO_RCVTIMEO affect accept()?

Does the SO_RCVTIMEO option affect accept (causing it to return 开发者_如何学运维EAGAIN or EWOULDBLOCK if the timeout expires)? Is there any behavior specified by the standard? I can't find it in the documentation for accept or use of options:

http://pubs.opengroup.org/onlinepubs/9699919799/functions/V2_chap02.html#tag_15_10_16


While on POSIX SO_RCVTIMEO is defined for "an input function", and SO_SNDTIMEO is defined for "an output function", I can'r find any definition for "input function" or "output function", so I'll just say they are read/receive and write/send at least.

In the specific case of Linux, SO_RCVTIMEO affects accept(), as can be seen by looking at inet_csk_accept(), and SO_SND_TIMEO affects connect(), as can be seen by looking at tcp_sendmsg().

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜