zmqpp  4.1.2
C++ bindings for 0mq (libzmq)
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
socket_options.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 
17 #ifndef ZMQPP_SOCKET_OPTIONS_HPP_
18 #define ZMQPP_SOCKET_OPTIONS_HPP_
19 
20 namespace zmqpp
21 {
22 
28 ZMQPP_COMPARABLE_ENUM socket_option {
29  affinity = ZMQ_AFFINITY,
30  identity = ZMQ_IDENTITY,
31  subscribe = ZMQ_SUBSCRIBE,
32  unsubscribe = ZMQ_UNSUBSCRIBE,
33  rate = ZMQ_RATE,
34  send_buffer_size = ZMQ_SNDBUF,
35  receive_buffer_size = ZMQ_RCVBUF,
36  receive_more = ZMQ_RCVMORE,
37  file_descriptor = ZMQ_FD,
38  events = ZMQ_EVENTS,
39  type = ZMQ_TYPE,
40  linger = ZMQ_LINGER,
41  backlog = ZMQ_BACKLOG,
42  reconnect_interval = ZMQ_RECONNECT_IVL,
43  reconnect_interval_max = ZMQ_RECONNECT_IVL_MAX,
44  receive_timeout = ZMQ_RCVTIMEO,
45  send_timeout = ZMQ_SNDTIMEO,
47 #if (ZMQ_VERSION_MAJOR == 2)
48  // Note that this is inverse of the zmq names for version 2.x
49  recovery_interval_seconds = ZMQ_RECOVERY_IVL,
50  recovery_interval = ZMQ_RECOVERY_IVL_MSEC,
51  high_water_mark = ZMQ_HWM,
52  swap_size = ZMQ_SWAP,
53  multicast_loopback = ZMQ_MCAST_LOOP,
54 #else // version > 2
55  recovery_interval = ZMQ_RECOVERY_IVL,
56  max_messsage_size = ZMQ_MAXMSGSIZE,
57  send_high_water_mark = ZMQ_SNDHWM,
58  receive_high_water_mark = ZMQ_RCVHWM,
59  multicast_hops = ZMQ_MULTICAST_HOPS,
61  #if (ZMQ_VERSION_MAJOR > 3) || ((ZMQ_VERSION_MAJOR == 3) && (ZMQ_VERSION_MINOR >= 1))
62  ipv4_only = ZMQ_IPV4ONLY,
63  #endif
64 
65  #if (ZMQ_VERSION_MAJOR > 3) || ((ZMQ_VERSION_MAJOR == 3) && (ZMQ_VERSION_MINOR >= 2))
66  #if ((ZMQ_VERSION_MAJOR == 3) && (ZMQ_VERSION_MINOR == 2))
67  delay_attach_on_connect = ZMQ_DELAY_ATTACH_ON_CONNECT,
68  #else
69  // ZMQ_DELAY_ATTACH_ON_CONNECT is renamed in ZeroMQ starting 3.3.x
70  immediate = ZMQ_IMMEDIATE,
71  #endif
72  last_endpoint = ZMQ_LAST_ENDPOINT,
73  router_mandatory = ZMQ_ROUTER_MANDATORY,
74  xpub_verbose = ZMQ_XPUB_VERBOSE,
75  tcp_keepalive = ZMQ_TCP_KEEPALIVE,
76  tcp_keepalive_idle = ZMQ_TCP_KEEPALIVE_IDLE,
77  tcp_keepalive_count = ZMQ_TCP_KEEPALIVE_CNT,
78  tcp_keepalive_interval = ZMQ_TCP_KEEPALIVE_INTVL,
79  tcp_accept_filter = ZMQ_TCP_ACCEPT_FILTER,
80  #endif
81 
82  #if (ZMQ_VERSION_MAJOR >= 4)
83  ipv6 = ZMQ_IPV6,
84  mechanism = ZMQ_MECHANISM,
85  plain_password = ZMQ_PLAIN_PASSWORD,
86  plain_server = ZMQ_PLAIN_SERVER,
87  plain_username = ZMQ_PLAIN_USERNAME,
88  zap_domain = ZMQ_ZAP_DOMAIN,
89  conflate = ZMQ_CONFLATE,
90  curve_public_key = ZMQ_CURVE_PUBLICKEY,
91  curve_secret_key = ZMQ_CURVE_SECRETKEY,
92  curve_server_key = ZMQ_CURVE_SERVERKEY,
93  curve_server = ZMQ_CURVE_SERVER,
94  probe_router = ZMQ_PROBE_ROUTER,
95  request_correlate = ZMQ_REQ_CORRELATE,
96  request_relaxed = ZMQ_REQ_RELAXED,
97  router_raw = ZMQ_ROUTER_RAW,
98  #endif
99 
100  #if (ZMQ_VERSION_MAJOR > 4) || ((ZMQ_VERSION_MAJOR == 4) && (ZMQ_VERSION_MINOR >= 1))
101  handshake_interval = ZMQ_HANDSHAKE_IVL,
102  type_of_service = ZMQ_TOS,
103  connect_rid = ZMQ_CONNECT_RID,
104  ipc_filter_gid = ZMQ_IPC_FILTER_GID,
105  ipc_filter_pid = ZMQ_IPC_FILTER_PID,
106  ipc_filter_uid = ZMQ_IPC_FILTER_UID,
107  router_handover = ZMQ_ROUTER_HANDOVER,
108  #endif
109 #endif // version > 2
110 
111 #ifdef ZMQ_EXPERIMENTAL_LABELS
112  receive_label = ZMQ_RCVLABEL,
113 #endif
114 };
115 
116 }
117 
118 #endif /* ZMQPP_SOCKET_OPTIONS_HPP_ */
C++ wrapper around zmq.
Definition: actor.cpp:29
ZMQPP_COMPARABLE_ENUM socket_option
possible Socket options in zmq
Definition: socket_options.hpp:28