What can cause a “Resource temporarily unavailable” on sock send() command

后端 未结 3 1141
南笙
南笙 2020-12-02 12:01

What can cause a Resource temporarily unavailable error on a socket send() command? The socket is setup as AF_UNIX, SOCK_STREAM. It wo

3条回答
  •  时光取名叫无心
    2020-12-02 12:13

    "Resource temporarily unavailable" is the error message corresponding to EAGAIN, which means that the operation would have blocked but nonblocking operation was requested. For send(), that could be due to any of:

    • explicitly marking the file descriptor as nonblocking with fcntl(); or
    • passing the MSG_DONTWAIT flag to send(); or
    • setting a send timeout with the SO_SNDTIMEO socket option.

提交回复
热议问题