nanomsg/nanomsg — pull request #165 by tailhook (2013-10-07 09:47:37+00:00)
Title: Separate structure for per-endpoint options

The strategy is as discussed in IRC: move that options into substructure, and copy on endpoint creation.

I'm unsure for the set of options. IIRC Martin pointed that SNDBUF and RCVBUF should be there, but I think that buffer can be changed at runtime. I.e. if user does `setsockopt`, we change that option on every connection we have now. Does it make sense?

Also it may be desirable to add `NN_SOL_ENDPOINT` to make it clear which options are applied for next endpoint, and which are global for the socket.

Fixes #142. Unfortunately I couldn't reproduce it with unit test, but it's reproduced 100% either using nanoconfig or in name_service branch

The patch is submitted under MIT License