zmqpp 4.1.2
C++ bindings for 0mq (libzmq)
Loading...
Searching...
No Matches
zmqpp.hpp
Go to the documentation of this file.
1/*
2 * This Source Code Form is subject to the terms of the Mozilla Public
3 * License, v. 2.0. If a copy of the MPL was not distributed with this
4 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
5 *
6 * This file is part of zmqpp.
7 * Copyright (c) 2011-2015 Contributors as noted in the AUTHORS file.
8 */
9
39#ifndef ZMQPP_ZMQPP_HPP_
40#define ZMQPP_ZMQPP_HPP_
41
46#define ZMQPP_VERSION_MAJOR 4
47
52#define ZMQPP_VERSION_MINOR 1
57#define ZMQPP_VERSION_REVISION 1
58
59#include <zmq.h>
60
61#include "compatibility.hpp"
62#include "context.hpp"
63#include "exception.hpp"
64#include "message.hpp"
65#include "poller.hpp"
66#include "socket.hpp"
67#include "actor.hpp"
68#include "reactor.hpp"
69#include "loop.hpp"
70#include "zap_request.hpp"
71#include "auth.hpp"
72
78namespace zmqpp
79{
80
86ZMQPP_EXPORT std::string version();
87
98ZMQPP_EXPORT void version(uint8_t& major, uint8_t& minor, uint8_t& revision);
99
114ZMQPP_EXPORT void zmq_version(uint8_t& major, uint8_t& minor, uint8_t& patch);
115
116#if (ZMQ_VERSION_MAJOR > 4) || ((ZMQ_VERSION_MAJOR == 4) && (ZMQ_VERSION_MINOR >= 1))
123ZMQPP_EXPORT bool has_capability(std::string const& capability);
124
130/* Protcols */
131inline bool has_protocol_ipc() { return has_capability("ipc"); }
132inline bool has_protocol_pgm() { return has_capability("pgm"); }
133inline bool has_protocol_tipc() { return has_capability("tipc"); }
134inline bool has_protocol_norm() { return has_capability("norm"); }
135
136/* Security Mechanisms */
137inline bool has_security_curve() { return has_capability("curve"); }
138inline bool has_security_gssapi() { return has_capability("gssapi"); }
139
145inline bool is_draft_api() { return has_capability("draft"); }
146#endif
147
148typedef context context_t;
149typedef std::string endpoint_t;
150typedef message message_t;
152typedef socket socket_t;
154}
155
156#endif /* ZMQPP_ZMQPP_HPP_ */
Polling wrapper.
Definition: poller.hpp:37
The socket class represents the zmq sockets.
Definition: socket.hpp:76
#define ZMQPP_EXPORT
Definition: compatibility.hpp:39
C++ wrapper around zmq.
Definition: actor.cpp:30
message message_t
message type
Definition: socket.hpp:41
bool has_security_gssapi()
Definition: zmqpp.hpp:138
socket socket_t
socket type
Definition: loop.hpp:26
bool has_protocol_ipc()
The following methods are helper functions for the known capabilies that the underlaying 0mq service ...
Definition: zmqpp.hpp:131
bool has_security_curve()
Definition: zmqpp.hpp:137
poller poller_t
poller type
Definition: zmqpp.hpp:151
bool is_draft_api()
Definition: zmqpp.hpp:145
std::string endpoint_t
endpoint type
Definition: socket.hpp:39
void zmq_version(uint8_t &major, uint8_t &minor, uint8_t &patch)
Definition: zmqpp.cpp:35
bool has_protocol_pgm()
Definition: zmqpp.hpp:132
std::string version()
Definition: zmqpp.cpp:23
bool has_protocol_tipc()
Definition: zmqpp.hpp:133
bool has_protocol_norm()
Definition: zmqpp.hpp:134
bool has_capability(std::string const &capability)
Definition: zmqpp.cpp:43
context context_t
context type
Definition: socket.hpp:40