I'm using OpenSSL and calling SSL_write(), which eventually calls ::send(). However, occasionally when there's too much traffic the other side disconnects. Consequently on my next write ::send() throws an exception.
I'd prefer to avoid this and return an error code so I can restart my application.
If I was calling ::send() myself I could pass the flag MSG_NOSIGNAL which causes ::send() to return an error code. However, I don't see such an argument for SSL_write().
Is there anything I can do instead?