Submitting this as an issue, otherwise it gets lost on the mailinglist:
http://www.freelists.org/post/nanomsg/cppnanomsg-throws-on-recv-if-survey-timed-out
- recv throws except for EAGAIN
- should also allow error codes such as ETIMEDOUT, EFSM
The wrapper is not usable for the survey pattern, as it returns EFSM right now (should be ETIMEDOUT, see: nanomsg/nanomsg#194).
There's only a single exception type. Catching it on deadline expiration may also catch a fatal error.
There's no way to distinguish between them.