According to [](http://stackoverflow.com/questions/2618736/why-is-it-assumed-that-send-may-return-with-less-than-requested-data-transmitted) EINTR means it sent nothing, if it's sent some bytes, it returns the number it's sent.  In either case I think you can recover by sending the rest of the bytes.

In the case of EMSGSIZE, you might be able to send it by manually splitting the message into smaller chunks, but tbh you're not going to hit that limit unless something is very wrong (I think the limit is 64k).