0

I inherited some socket code that uses MSG_CONFIRM as the flag in a send(). The man-page for send() seems to say that MSG_CONFIRM is only applicable for UDP sockets. This is an AF_UNIX socket using the TCP protocol.

Without the MSG_CONFIRM flag I get "resource temporarily unavailable" on the send().

What does MSG_CONFIRM meant in this context ... a AF_UNIX socket using the TCP protocol?

jski
  • 41
  • 5
  • Related: http://stackoverflow.com/questions/16594387/why-should-i-use-or-not-use-msg-confirm – Barmar Apr 26 '17 at 22:37

1 Answers1

0

I jettisoned the MSG_CONFIRM with the AF_UNIX socket and polled on POLLOUT before attempting to send. I also ended up leaving the socket and associated send()'s being nonblocking. Works fine now.

jski
  • 41
  • 5
  • 1
    Polling on POLLOUT *before* sending is a waste of time. A socket is normally writeable. You should only use POLLOUT when you have had a send error of EAGAIN/EWOULDBLOCK. None of this has anything to do with MSG_CONFIRM. – user207421 Apr 29 '17 at 08:42