nanomsgxx
View on GitHub

nnxx

The nnxx namespace contains most of the types and symbols of the API, it ports all constants of the C API into the namespace, the following table shows what nanomsgxx name binds to which nanomsg constant.

C (nanomsg) C++ (nanomsgxx)
AF_SP SP
AF_SP_RAW SP_RAW
NN_BUS BUS
NN_DOMAIN DOMAIN
NN_DONTWAIT DONTWAIT
NN_IPV4ONLY IPV4ONLY
NN_LINGER LINGER
NN_MSG MSG
NN_NS_DOMAIN NS_DOMAIN
NN_NS_ERROR NS_ERROR
NN_NS_FLAG NS_FLAG
NN_NS_LIMIT NS_LIMIT
NN_NS_NAMESPACE NS_NAMESPACE
NN_NS_OPTION_LEVEL NS_OPTION_LEVEL
NN_NS_OPTION_TYPE NS_OPTION_TYPE
NN_NS_PROTOCOL NS_PROTOCOL
NN_NS_SOCKET_OPTION NS_SOCKET_OPTION
NN_NS_TRANSPORT NS_TRANSPORT
NN_NS_TRANSPORT_OPTION NS_TRANSPORT_OPTION
NN_NS_VERSION NS_VERSION
NN_PAIR PAIR
NN_POLLIN EV_POLLIN
NN_POLLOUT EV_POLLOUT
NN_PROTOCOL PROTOCOL
NN_PUB PUB
NN_PULL PULL
NN_PUSH PUSH
NN_RCVBUF RCVBUF
NN_RCVTIMEO RCVTIMEO
NN_RECONNECT_IVL RECONNECT_IVL
NN_RECONNECT_IVL_MAX RECONNECT_IVL_MAX
NN_REP REP
NN_REQ REQ
NN_REQ_RESEND_IVL REQ_RESEND_IVL
NN_RESPONDENT RESPONDENT
NN_SNDBUF SNDBUF
NN_SNDPRIO SNDPRIO
NN_SNDTIMEO SNDTIMEO
NN_SOCKADDR_MAX SOCKADDR_MAX
NN_SOCKET_NAME SOCKET_NAME
NN_SUB SUB
NN_SUB_SUBSCRIBE SUB_SUBSCRIBE
NN_SUB_UNSUBSCRIBE SUB_UNSUBSCRIBE
NN_SURVEYOR SURVEYOR
NN_SURVEYOR_DEADLINE SURVEYOR_DEADLINE
NN_TCP_NODELAY TCP_NODELAY
NN_TYPE_INT TYPE_INT
NN_TYPE_NONE TYPE_NONE
NN_TYPE_STR TYPE_STR
NN_UNIT_BOOLEAN UNIT_BOOLEAN
NN_UNIT_BYTES UNIT_BYTES
NN_UNIT_MILLISECONDS UNIT_MILLISECONDS
NN_UNIT_NONE UNIT_NONE
NN_UNIT_PRIORITY UNIT_PRIORITY

The nnxx also provides some extra constants specific to the C++ API.

Name Description
NO_SIGNAL_ERROR Flag that prevents functions from throwing an exception when the operation is cancelled by the processing of a signal
NO_TIMEOUT_ERROR Flag that prevent functions from throwing an exception when the operation times out