zmqpp
4.1.2
C++ bindings for 0mq (libzmq)
|
C++ wrapper around zmq. More...
Namespaces | |
curve | |
ZMQ curve facilities. | |
event | |
z85 | |
Provide z85 encoding and decoding facilities. | |
Classes | |
class | actor |
An actor is a thread with a pair socket connected to its parent. More... | |
class | actor_initialization_exception |
Represents a failed zmqpp::actor initialization. More... | |
class | auth |
auth - authentication for ZeroMQ security mechanisms More... | |
struct | callback_releaser |
internal construct | |
class | context |
The context class represents internal zmq context and io threads. More... | |
class | exception |
Represents the base zmqpp exception. More... | |
class | frame |
an internal frame wrapper for a single zmq message More... | |
class | invalid_instance |
Represents an attempt to use an invalid object. More... | |
class | message |
a zmq message with optional multipart support More... | |
class | poller |
Polling wrapper. More... | |
class | reactor |
Reactor object that helps to manage multiple socket by calling a user-defined handler for each socket when a watched event occurs. More... | |
class | socket |
The socket class represents the zmq sockets. More... | |
class | z85_exception |
Thrown when an error occurs while encoding or decoding to/from z85. More... | |
class | zap_handler |
A base ZAP handler object. More... | |
class | zap_request |
A class for working with ZAP requests and replies. More... | |
class | zmq_internal_exception |
Represents internal zmq errors. More... | |
Typedefs | |
typedef int | raw_socket_t |
typedef socket | socket_t |
socket type More... | |
typedef std::string | endpoint_t |
endpoint type More... | |
typedef context | context_t |
context type More... | |
typedef message | message_t |
message type More... | |
typedef poller | poller_t |
poller type More... | |
Enumerations | |
enum | order { order::big_endian, order::little_endian } |
Possible byte order types. More... | |
enum | signal : int64_t { signal::header = 0x0077665544332211L, signal::ok = (header << 8) | 0x00, signal::ko = (header << 8) | 0x01, signal::stop = (header << 8) | 0x02, signal::test = (header << 8) | 0xFF } |
Signal is a 8 bytes integer. More... | |
Functions | |
uint64_t | swap_if_needed (uint64_t const value_to_check) |
uint64_t | htonll (uint64_t const hostlonglong) |
uint64_t | ntohll (uint64_t const networklonglong) |
float | htonf (float value) |
float | ntohf (float value) |
double | htond (double value) |
double | ntohd (double value) |
std::string | version () |
void | version (uint8_t &major, uint8_t &minor, uint8_t &revision) |
void | zmq_version (uint8_t &major, uint8_t &minor, uint8_t &patch) |
Variables | |
ZMQPP_COMPARABLE_ENUM | context_option |
possible Context options in zmq More... | |
ZMQPP_COMPARABLE_ENUM | socket_security |
Socket security mechanisms allowed by zmq. More... | |
ZMQPP_COMPARABLE_ENUM | socket_option |
possible Socket options in zmq More... | |
ZMQPP_COMPARABLE_ENUM | socket_type |
Socket types allowed by zmq. More... | |
C++ wrapper around zmq.
All zmq++ / zmqpp functions, constants and classes live within this namespace,
typedef context zmqpp::context_t |
context type
typedef std::string zmqpp::endpoint_t |
endpoint type
typedef message zmqpp::message_t |
message type
typedef poller zmqpp::poller_t |
poller type
typedef int zmqpp::raw_socket_t |
typedef socket zmqpp::socket_t |
socket type
|
strong |
|
strong |
Signal is a 8 bytes integer.
7 first bytes acts as a magic number so we can distinguish signal from other message. The last byte is the signal's value.
Enumerator | |
---|---|
header |
Only 7 bytes matter here. |
ok |
Indicates a success. |
ko |
Indicates an error. |
stop |
Indicates a request to stop. This is used from parent thread to child within the actor class |
test |
|
inline |
double precision floating point version of the htons/htonl
value | host order double precision floating point |
|
inline |
floating point version of the htons/htonl
value | host order floating point |
|
inline |
64 bit version of the htons/htonl
I've used the name htonll to try and keep with the htonl naming scheme. We do not define this function if the macro htonll
exists.
hostlonglong | unsigned 64 bit host order integer |
|
inline |
double precision floating point version of the ntohs/ntohl
value | network order double precision floating point |
|
inline |
floating point version of the ntohs/ntohl
value | network order float |
|
inline |
64 bit version of the ntohs/ntohl
I've used the name htonll to try and keep with the htonl naming scheme. We do not define this function if the macro ntohll
exists.
networklonglong | unsigned 64 bit network order integer |
|
inline |
Common code for the 64bit versions of htons/htons and ntohs/ntohl
As htons and ntohs (or htonl and ntohs) always just do the same thing, ie swap bytes if the host order differs from network order or otherwise don't do anything, it seemed silly to type the code twice.
value_to_check | unsigned 64 bit integer to swap |
std::string zmqpp::version | ( | ) |
Returns the current major.minor.revision version number as a string.
void zmqpp::version | ( | uint8_t & | major, |
uint8_t & | minor, | ||
uint8_t & | revision | ||
) |
Retrieve the parts of the zmqpp version number.
Set the three parameters to values representing the zmqpp version number. These values are generated at library compile time.
major | an unsigned 8 bit reference to set to the major version. |
minor | an unsigned 8 bit reference to set to the minor version. |
revision | an unsigned 8 bit reference to set the current revision. |
void zmqpp::zmq_version | ( | uint8_t & | major, |
uint8_t & | minor, | ||
uint8_t & | patch | ||
) |
Retrieve the parts of the 0mq version this library was built against.
Because sections of the library are optionally compiled in or ignored depending on the version of 0mq it was compiled against this method is provided to allow sanity checking for usage.
Set the three parameters to values representing the 0mq version number. These values are generated at library compile time.
major | an unsigned 8 bit reference to set to the major version. |
minor | an unsigned 8 bit reference to set to the minor version. |
revision | an unsigned 8 bit reference to set the current revision. |
ZMQPP_COMPARABLE_ENUM zmqpp::context_option |
possible Context options in zmq
I/O thread count Maximum supported sockets Enable ipv6 for all new sockets
ZMQPP_COMPARABLE_ENUM zmqpp::socket_option |
possible Socket options in zmq
I/O thread affinity Socket identity Add topic subscription - set only Remove topic subscription - set only Multicast data rate Kernel transmission buffer size Kernel receive buffer size Can receive more parts - get only Socket file descriptor - get only Socket event flags - get only Socket type - get only Socket linger timeout Maximum length of outstanding connections - get only Reconnection interval Maximum reconnection interval Maximum inbound block timeout Maximum outbound block timeout Multicast recovery interval in milliseconds Maximum inbound message size High-water mark for outbound messages High-water mark for inbound messages Maximum number of multicast hops Block message sending until connect complete Last bound endpoint - get only Require routable messages - set only Pass on existing subscriptions - set only Enable TCP keepalives TCP keepalive idle count (generally retry count) TCP keepalive retry count TCP keepalive interval Filter inbound connections - set only IPv6 socket support status Socket security mechanism - get only PLAIN password PLAIN server role PLAIN username RFC 27 authentication domain Keep only last message - set only CURVE public key CURVE secret key CURVE server key CURVE server role - set only Bootstrap connections to ROUTER sockets - set only Match replies with requests - set only Relax strict alternation between request and reply - set only Switch ROUTER socket to raw mode - set only Maximum handshake interval Type-of-Service socket override status Assign the next outbound connection id - set only Group ID filters to allow new IPC connections - set only Process ID filters to allow new IPC connections - set only User ID filters to allow new IPC connections - set only Handle duplicate client identities on ROUTER sockets - set only
ZMQPP_COMPARABLE_ENUM zmqpp::socket_security |
Socket security mechanisms allowed by zmq.
Each is designed for a different use and has different limitations.
ZMQPP_COMPARABLE_ENUM zmqpp::socket_type |
Socket types allowed by zmq.
The socket type choose at creation must be one of these types.
Each is designed for a different use and has different limitations.version of ::publish to match zmq name convention version of ::subscribe to match zmq name convention version of ::request to match zmq name convention version of ::reply to match zmq name convention version of ::xpublish to match zmq name convention version of ::xsubscribe to match zmq name convention version of ::xrequest to match zmq name convention version of ::xreply to match zmq name convention