1 /*
2 ################################################################################
3 # THIS FILE IS 100% GENERATED BY ZPROJECT; DO NOT EDIT EXCEPT EXPERIMENTALLY #
4 # Read the zproject/README.md for information about making permanent changes. #
5 ################################################################################
6 */
7
8 #include "qczmq.h"
9
10 ///
11 // Copy-construct to return the proper wrapped c types
QZsock(zsock_t * self,QObject * qObjParent)12 QZsock::QZsock (zsock_t *self, QObject *qObjParent) : QObject (qObjParent)
13 {
14 this->self = self;
15 }
16
17
18 ///
19 // Create a new socket. Returns the new socket, or NULL if the new socket
20 // could not be created. Note that the symbol zsock_new (and other
21 // constructors/destructors for zsock) are redirected to the *_checked
22 // variant, enabling intelligent socket leak detection. This can have
23 // performance implications if you use a LOT of sockets. To turn off this
24 // redirection behaviour, define ZSOCK_NOCHECK.
QZsock(int type,QObject * qObjParent)25 QZsock::QZsock (int type, QObject *qObjParent) : QObject (qObjParent)
26 {
27 this->self = zsock_new (type);
28 }
29
30 ///
31 // Create a PUB socket. Default action is bind.
newPub(const QString & endpoint,QObject * qObjParent)32 QZsock* QZsock::newPub (const QString &endpoint, QObject *qObjParent)
33 {
34 return new QZsock (zsock_new_pub (endpoint.toUtf8().data()), qObjParent);
35 }
36
37 ///
38 // Create a SUB socket, and optionally subscribe to some prefix string. Default
39 // action is connect.
newSub(const QString & endpoint,const QString & subscribe,QObject * qObjParent)40 QZsock* QZsock::newSub (const QString &endpoint, const QString &subscribe, QObject *qObjParent)
41 {
42 return new QZsock (zsock_new_sub (endpoint.toUtf8().data(), subscribe.toUtf8().data()), qObjParent);
43 }
44
45 ///
46 // Create a REQ socket. Default action is connect.
newReq(const QString & endpoint,QObject * qObjParent)47 QZsock* QZsock::newReq (const QString &endpoint, QObject *qObjParent)
48 {
49 return new QZsock (zsock_new_req (endpoint.toUtf8().data()), qObjParent);
50 }
51
52 ///
53 // Create a REP socket. Default action is bind.
newRep(const QString & endpoint,QObject * qObjParent)54 QZsock* QZsock::newRep (const QString &endpoint, QObject *qObjParent)
55 {
56 return new QZsock (zsock_new_rep (endpoint.toUtf8().data()), qObjParent);
57 }
58
59 ///
60 // Create a DEALER socket. Default action is connect.
newDealer(const QString & endpoint,QObject * qObjParent)61 QZsock* QZsock::newDealer (const QString &endpoint, QObject *qObjParent)
62 {
63 return new QZsock (zsock_new_dealer (endpoint.toUtf8().data()), qObjParent);
64 }
65
66 ///
67 // Create a ROUTER socket. Default action is bind.
newRouter(const QString & endpoint,QObject * qObjParent)68 QZsock* QZsock::newRouter (const QString &endpoint, QObject *qObjParent)
69 {
70 return new QZsock (zsock_new_router (endpoint.toUtf8().data()), qObjParent);
71 }
72
73 ///
74 // Create a PUSH socket. Default action is connect.
newPush(const QString & endpoint,QObject * qObjParent)75 QZsock* QZsock::newPush (const QString &endpoint, QObject *qObjParent)
76 {
77 return new QZsock (zsock_new_push (endpoint.toUtf8().data()), qObjParent);
78 }
79
80 ///
81 // Create a PULL socket. Default action is bind.
newPull(const QString & endpoint,QObject * qObjParent)82 QZsock* QZsock::newPull (const QString &endpoint, QObject *qObjParent)
83 {
84 return new QZsock (zsock_new_pull (endpoint.toUtf8().data()), qObjParent);
85 }
86
87 ///
88 // Create an XPUB socket. Default action is bind.
newXpub(const QString & endpoint,QObject * qObjParent)89 QZsock* QZsock::newXpub (const QString &endpoint, QObject *qObjParent)
90 {
91 return new QZsock (zsock_new_xpub (endpoint.toUtf8().data()), qObjParent);
92 }
93
94 ///
95 // Create an XSUB socket. Default action is connect.
newXsub(const QString & endpoint,QObject * qObjParent)96 QZsock* QZsock::newXsub (const QString &endpoint, QObject *qObjParent)
97 {
98 return new QZsock (zsock_new_xsub (endpoint.toUtf8().data()), qObjParent);
99 }
100
101 ///
102 // Create a PAIR socket. Default action is connect.
newPair(const QString & endpoint,QObject * qObjParent)103 QZsock* QZsock::newPair (const QString &endpoint, QObject *qObjParent)
104 {
105 return new QZsock (zsock_new_pair (endpoint.toUtf8().data()), qObjParent);
106 }
107
108 ///
109 // Create a STREAM socket. Default action is connect.
newStream(const QString & endpoint,QObject * qObjParent)110 QZsock* QZsock::newStream (const QString &endpoint, QObject *qObjParent)
111 {
112 return new QZsock (zsock_new_stream (endpoint.toUtf8().data()), qObjParent);
113 }
114
115 ///
116 // Create a SERVER socket. Default action is bind.
newServer(const QString & endpoint,QObject * qObjParent)117 QZsock* QZsock::newServer (const QString &endpoint, QObject *qObjParent)
118 {
119 return new QZsock (zsock_new_server (endpoint.toUtf8().data()), qObjParent);
120 }
121
122 ///
123 // Create a CLIENT socket. Default action is connect.
newClient(const QString & endpoint,QObject * qObjParent)124 QZsock* QZsock::newClient (const QString &endpoint, QObject *qObjParent)
125 {
126 return new QZsock (zsock_new_client (endpoint.toUtf8().data()), qObjParent);
127 }
128
129 ///
130 // Create a RADIO socket. Default action is bind.
newRadio(const QString & endpoint,QObject * qObjParent)131 QZsock* QZsock::newRadio (const QString &endpoint, QObject *qObjParent)
132 {
133 return new QZsock (zsock_new_radio (endpoint.toUtf8().data()), qObjParent);
134 }
135
136 ///
137 // Create a DISH socket. Default action is connect.
newDish(const QString & endpoint,QObject * qObjParent)138 QZsock* QZsock::newDish (const QString &endpoint, QObject *qObjParent)
139 {
140 return new QZsock (zsock_new_dish (endpoint.toUtf8().data()), qObjParent);
141 }
142
143 ///
144 // Create a GATHER socket. Default action is bind.
newGather(const QString & endpoint,QObject * qObjParent)145 QZsock* QZsock::newGather (const QString &endpoint, QObject *qObjParent)
146 {
147 return new QZsock (zsock_new_gather (endpoint.toUtf8().data()), qObjParent);
148 }
149
150 ///
151 // Create a SCATTER socket. Default action is connect.
newScatter(const QString & endpoint,QObject * qObjParent)152 QZsock* QZsock::newScatter (const QString &endpoint, QObject *qObjParent)
153 {
154 return new QZsock (zsock_new_scatter (endpoint.toUtf8().data()), qObjParent);
155 }
156
157 ///
158 // Destroy the socket. You must use this for any socket created via the
159 // zsock_new method.
~QZsock()160 QZsock::~QZsock ()
161 {
162 zsock_destroy (&self);
163 }
164
165 ///
166 // Bind a socket to a formatted endpoint. For tcp:// endpoints, supports
167 // ephemeral ports, if you specify the port number as "*". By default
168 // zsock uses the IANA designated range from C000 (49152) to FFFF (65535).
169 // To override this range, follow the "*" with "[first-last]". Either or
170 // both first and last may be empty. To bind to a random port within the
171 // range, use "!" in place of "*".
172 //
173 // Examples:
174 // tcp://127.0.0.1:* bind to first free port from C000 up
175 // tcp://127.0.0.1:! bind to random port from C000 to FFFF
176 // tcp://127.0.0.1:*[60000-] bind to first free port from 60000 up
177 // tcp://127.0.0.1:![-60000] bind to random port from C000 to 60000
178 // tcp://127.0.0.1:![55000-55999]
179 // bind to random port from 55000 to 55999
180 //
181 // On success, returns the actual port number used, for tcp:// endpoints,
182 // and 0 for other transports. On failure, returns -1. Note that when using
183 // ephemeral ports, a port may be reused by different services without
184 // clients being aware. Protocols that run on ephemeral ports should take
185 // this into account.
bind(const QString & param)186 int QZsock::bind (const QString ¶m)
187 {
188 int rv = zsock_bind (self, "%s", param.toUtf8().data());
189 return rv;
190 }
191
192 ///
193 // Returns last bound endpoint, if any.
endpoint()194 const QString QZsock::endpoint ()
195 {
196 const QString rv = QString (zsock_endpoint (self));
197 return rv;
198 }
199
200 ///
201 // Unbind a socket from a formatted endpoint.
202 // Returns 0 if OK, -1 if the endpoint was invalid or the function
203 // isn't supported.
unbind(const QString & param)204 int QZsock::unbind (const QString ¶m)
205 {
206 int rv = zsock_unbind (self, "%s", param.toUtf8().data());
207 return rv;
208 }
209
210 ///
211 // Connect a socket to a formatted endpoint
212 // Returns 0 if OK, -1 if the endpoint was invalid.
connect(const QString & param)213 int QZsock::connect (const QString ¶m)
214 {
215 int rv = zsock_connect (self, "%s", param.toUtf8().data());
216 return rv;
217 }
218
219 ///
220 // Disconnect a socket from a formatted endpoint
221 // Returns 0 if OK, -1 if the endpoint was invalid or the function
222 // isn't supported.
disconnect(const QString & param)223 int QZsock::disconnect (const QString ¶m)
224 {
225 int rv = zsock_disconnect (self, "%s", param.toUtf8().data());
226 return rv;
227 }
228
229 ///
230 // Attach a socket to zero or more endpoints. If endpoints is not null,
231 // parses as list of ZeroMQ endpoints, separated by commas, and prefixed by
232 // '@' (to bind the socket) or '>' (to connect the socket). Returns 0 if all
233 // endpoints were valid, or -1 if there was a syntax error. If the endpoint
234 // does not start with '@' or '>', the serverish argument defines whether
235 // it is used to bind (serverish = true) or connect (serverish = false).
attach(const QString & endpoints,bool serverish)236 int QZsock::attach (const QString &endpoints, bool serverish)
237 {
238 int rv = zsock_attach (self, endpoints.toUtf8().data(), serverish);
239 return rv;
240 }
241
242 ///
243 // Returns socket type as printable constant string.
typeStr()244 const QString QZsock::typeStr ()
245 {
246 const QString rv = QString (zsock_type_str (self));
247 return rv;
248 }
249
250 ///
251 // Send a 'picture' message to the socket (or actor). The picture is a
252 // string that defines the type of each frame. This makes it easy to send
253 // a complex multiframe message in one call. The picture can contain any
254 // of these characters, each corresponding to one or two arguments:
255 //
256 // i = int (signed)
257 // 1 = uint8_t
258 // 2 = uint16_t
259 // 4 = uint32_t
260 // 8 = uint64_t
261 // s = char *
262 // b = byte *, size_t (2 arguments)
263 // c = zchunk_t *
264 // f = zframe_t *
265 // h = zhashx_t *
266 // U = zuuid_t *
267 // p = void * (sends the pointer value, only meaningful over inproc)
268 // m = zmsg_t * (sends all frames in the zmsg)
269 // z = sends zero-sized frame (0 arguments)
270 // u = uint (deprecated)
271 //
272 // Note that s, b, c, and f are encoded the same way and the choice is
273 // offered as a convenience to the sender, which may or may not already
274 // have data in a zchunk or zframe. Does not change or take ownership of
275 // any arguments. Returns 0 if successful, -1 if sending failed for any
276 // reason.
send(const QString & picture,...)277 int QZsock::send (const QString &picture, ...)
278 {
279 va_list args;
280 va_start (args, picture);
281 int rv = zsock_vsend (self, picture.toUtf8().data(), args);
282 va_end (args);
283 return rv;
284 }
285
286 ///
287 // Send a 'picture' message to the socket (or actor). This is a va_list
288 // version of zsock_send (), so please consult its documentation for the
289 // details.
vsend(const QString & picture,va_list argptr)290 int QZsock::vsend (const QString &picture, va_list argptr)
291 {
292 int rv = zsock_vsend (self, picture.toUtf8().data(), argptr);
293 return rv;
294 }
295
296 ///
297 // Receive a 'picture' message to the socket (or actor). See zsock_send for
298 // the format and meaning of the picture. Returns the picture elements into
299 // a series of pointers as provided by the caller:
300 //
301 // i = int * (stores signed integer)
302 // 4 = uint32_t * (stores 32-bit unsigned integer)
303 // 8 = uint64_t * (stores 64-bit unsigned integer)
304 // s = char ** (allocates new string)
305 // b = byte **, size_t * (2 arguments) (allocates memory)
306 // c = zchunk_t ** (creates zchunk)
307 // f = zframe_t ** (creates zframe)
308 // U = zuuid_t * (creates a zuuid with the data)
309 // h = zhashx_t ** (creates zhashx)
310 // p = void ** (stores pointer)
311 // m = zmsg_t ** (creates a zmsg with the remaing frames)
312 // z = null, asserts empty frame (0 arguments)
313 // u = uint * (stores unsigned integer, deprecated)
314 //
315 // Note that zsock_recv creates the returned objects, and the caller must
316 // destroy them when finished with them. The supplied pointers do not need
317 // to be initialized. Returns 0 if successful, or -1 if it failed to recv
318 // a message, in which case the pointers are not modified. When message
319 // frames are truncated (a short message), sets return values to zero/null.
320 // If an argument pointer is NULL, does not store any value (skips it).
321 // An 'n' picture matches an empty frame; if the message does not match,
322 // the method will return -1.
recv(const QString & picture,...)323 int QZsock::recv (const QString &picture, ...)
324 {
325 va_list args;
326 va_start (args, picture);
327 int rv = zsock_vrecv (self, picture.toUtf8().data(), args);
328 va_end (args);
329 return rv;
330 }
331
332 ///
333 // Receive a 'picture' message from the socket (or actor). This is a
334 // va_list version of zsock_recv (), so please consult its documentation
335 // for the details.
vrecv(const QString & picture,va_list argptr)336 int QZsock::vrecv (const QString &picture, va_list argptr)
337 {
338 int rv = zsock_vrecv (self, picture.toUtf8().data(), argptr);
339 return rv;
340 }
341
342 ///
343 // Return socket routing ID if any. This returns 0 if the socket is not
344 // of type ZMQ_SERVER or if no request was already received on it.
routingId()345 quint32 QZsock::routingId ()
346 {
347 uint32_t rv = zsock_routing_id (self);
348 return rv;
349 }
350
351 ///
352 // Set routing ID on socket. The socket MUST be of type ZMQ_SERVER.
353 // This will be used when sending messages on the socket via the zsock API.
setRoutingId(quint32 routingId)354 void QZsock::setRoutingId (quint32 routingId)
355 {
356 zsock_set_routing_id (self, (uint32_t) routingId);
357
358 }
359
360 ///
361 // Set socket to use unbounded pipes (HWM=0); use this in cases when you are
362 // totally certain the message volume can fit in memory. This method works
363 // across all versions of ZeroMQ. Takes a polymorphic socket reference.
setUnbounded()364 void QZsock::setUnbounded ()
365 {
366 zsock_set_unbounded (self);
367
368 }
369
370 ///
371 // Send a signal over a socket. A signal is a short message carrying a
372 // success/failure code (by convention, 0 means OK). Signals are encoded
373 // to be distinguishable from "normal" messages. Accepts a zsock_t or a
374 // zactor_t argument, and returns 0 if successful, -1 if the signal could
375 // not be sent. Takes a polymorphic socket reference.
signal(byte status)376 int QZsock::signal (byte status)
377 {
378 int rv = zsock_signal (self, status);
379 return rv;
380 }
381
382 ///
383 // Wait on a signal. Use this to coordinate between threads, over pipe
384 // pairs. Blocks until the signal is received. Returns -1 on error, 0 or
385 // greater on success. Accepts a zsock_t or a zactor_t as argument.
386 // Takes a polymorphic socket reference.
wait()387 int QZsock::wait ()
388 {
389 int rv = zsock_wait (self);
390 return rv;
391 }
392
393 ///
394 // If there is a partial message still waiting on the socket, remove and
395 // discard it. This is useful when reading partial messages, to get specific
396 // message types.
flush()397 void QZsock::flush ()
398 {
399 zsock_flush (self);
400
401 }
402
403 ///
404 // Join a group for the RADIO-DISH pattern. Call only on ZMQ_DISH.
405 // Returns 0 if OK, -1 if failed.
join(const QString & group)406 int QZsock::join (const QString &group)
407 {
408 int rv = zsock_join (self, group.toUtf8().data());
409 return rv;
410 }
411
412 ///
413 // Leave a group for the RADIO-DISH pattern. Call only on ZMQ_DISH.
414 // Returns 0 if OK, -1 if failed.
leave(const QString & group)415 int QZsock::leave (const QString &group)
416 {
417 int rv = zsock_leave (self, group.toUtf8().data());
418 return rv;
419 }
420
421 ///
422 // Probe the supplied object, and report if it looks like a zsock_t.
423 // Takes a polymorphic socket reference.
is(void * self)424 bool QZsock::is (void *self)
425 {
426 bool rv = zsock_is (self);
427 return rv;
428 }
429
430 ///
431 // Probe the supplied reference. If it looks like a zsock_t instance, return
432 // the underlying libzmq socket handle; else if it looks like a file
433 // descriptor, return NULL; else if it looks like a libzmq socket handle,
434 // return the supplied value. Takes a polymorphic socket reference.
resolve(void * self)435 void * QZsock::resolve (void *self)
436 {
437 void * rv = zsock_resolve (self);
438 return rv;
439 }
440
441 ///
442 // Get socket option `heartbeat_ivl`.
443 // Available from libzmq 4.2.0.
heartbeatIvl()444 int QZsock::heartbeatIvl ()
445 {
446 int rv = zsock_heartbeat_ivl (self);
447 return rv;
448 }
449
450 ///
451 // Set socket option `heartbeat_ivl`.
452 // Available from libzmq 4.2.0.
setHeartbeatIvl(int heartbeatIvl)453 void QZsock::setHeartbeatIvl (int heartbeatIvl)
454 {
455 zsock_set_heartbeat_ivl (self, heartbeatIvl);
456
457 }
458
459 ///
460 // Get socket option `heartbeat_ttl`.
461 // Available from libzmq 4.2.0.
heartbeatTtl()462 int QZsock::heartbeatTtl ()
463 {
464 int rv = zsock_heartbeat_ttl (self);
465 return rv;
466 }
467
468 ///
469 // Set socket option `heartbeat_ttl`.
470 // Available from libzmq 4.2.0.
setHeartbeatTtl(int heartbeatTtl)471 void QZsock::setHeartbeatTtl (int heartbeatTtl)
472 {
473 zsock_set_heartbeat_ttl (self, heartbeatTtl);
474
475 }
476
477 ///
478 // Get socket option `heartbeat_timeout`.
479 // Available from libzmq 4.2.0.
heartbeatTimeout()480 int QZsock::heartbeatTimeout ()
481 {
482 int rv = zsock_heartbeat_timeout (self);
483 return rv;
484 }
485
486 ///
487 // Set socket option `heartbeat_timeout`.
488 // Available from libzmq 4.2.0.
setHeartbeatTimeout(int heartbeatTimeout)489 void QZsock::setHeartbeatTimeout (int heartbeatTimeout)
490 {
491 zsock_set_heartbeat_timeout (self, heartbeatTimeout);
492
493 }
494
495 ///
496 // Get socket option `use_fd`.
497 // Available from libzmq 4.2.0.
useFd()498 int QZsock::useFd ()
499 {
500 int rv = zsock_use_fd (self);
501 return rv;
502 }
503
504 ///
505 // Set socket option `use_fd`.
506 // Available from libzmq 4.2.0.
setUseFd(int useFd)507 void QZsock::setUseFd (int useFd)
508 {
509 zsock_set_use_fd (self, useFd);
510
511 }
512
513 ///
514 // Set socket option `xpub_manual`.
515 // Available from libzmq 4.2.0.
setXpubManual(int xpubManual)516 void QZsock::setXpubManual (int xpubManual)
517 {
518 zsock_set_xpub_manual (self, xpubManual);
519
520 }
521
522 ///
523 // Set socket option `xpub_welcome_msg`.
524 // Available from libzmq 4.2.0.
setXpubWelcomeMsg(const QString & xpubWelcomeMsg)525 void QZsock::setXpubWelcomeMsg (const QString &xpubWelcomeMsg)
526 {
527 zsock_set_xpub_welcome_msg (self, xpubWelcomeMsg.toUtf8().data());
528
529 }
530
531 ///
532 // Set socket option `stream_notify`.
533 // Available from libzmq 4.2.0.
setStreamNotify(int streamNotify)534 void QZsock::setStreamNotify (int streamNotify)
535 {
536 zsock_set_stream_notify (self, streamNotify);
537
538 }
539
540 ///
541 // Get socket option `invert_matching`.
542 // Available from libzmq 4.2.0.
invertMatching()543 int QZsock::invertMatching ()
544 {
545 int rv = zsock_invert_matching (self);
546 return rv;
547 }
548
549 ///
550 // Set socket option `invert_matching`.
551 // Available from libzmq 4.2.0.
setInvertMatching(int invertMatching)552 void QZsock::setInvertMatching (int invertMatching)
553 {
554 zsock_set_invert_matching (self, invertMatching);
555
556 }
557
558 ///
559 // Set socket option `xpub_verboser`.
560 // Available from libzmq 4.2.0.
setXpubVerboser(int xpubVerboser)561 void QZsock::setXpubVerboser (int xpubVerboser)
562 {
563 zsock_set_xpub_verboser (self, xpubVerboser);
564
565 }
566
567 ///
568 // Get socket option `connect_timeout`.
569 // Available from libzmq 4.2.0.
connectTimeout()570 int QZsock::connectTimeout ()
571 {
572 int rv = zsock_connect_timeout (self);
573 return rv;
574 }
575
576 ///
577 // Set socket option `connect_timeout`.
578 // Available from libzmq 4.2.0.
setConnectTimeout(int connectTimeout)579 void QZsock::setConnectTimeout (int connectTimeout)
580 {
581 zsock_set_connect_timeout (self, connectTimeout);
582
583 }
584
585 ///
586 // Get socket option `tcp_maxrt`.
587 // Available from libzmq 4.2.0.
tcpMaxrt()588 int QZsock::tcpMaxrt ()
589 {
590 int rv = zsock_tcp_maxrt (self);
591 return rv;
592 }
593
594 ///
595 // Set socket option `tcp_maxrt`.
596 // Available from libzmq 4.2.0.
setTcpMaxrt(int tcpMaxrt)597 void QZsock::setTcpMaxrt (int tcpMaxrt)
598 {
599 zsock_set_tcp_maxrt (self, tcpMaxrt);
600
601 }
602
603 ///
604 // Get socket option `thread_safe`.
605 // Available from libzmq 4.2.0.
threadSafe()606 int QZsock::threadSafe ()
607 {
608 int rv = zsock_thread_safe (self);
609 return rv;
610 }
611
612 ///
613 // Get socket option `multicast_maxtpdu`.
614 // Available from libzmq 4.2.0.
multicastMaxtpdu()615 int QZsock::multicastMaxtpdu ()
616 {
617 int rv = zsock_multicast_maxtpdu (self);
618 return rv;
619 }
620
621 ///
622 // Set socket option `multicast_maxtpdu`.
623 // Available from libzmq 4.2.0.
setMulticastMaxtpdu(int multicastMaxtpdu)624 void QZsock::setMulticastMaxtpdu (int multicastMaxtpdu)
625 {
626 zsock_set_multicast_maxtpdu (self, multicastMaxtpdu);
627
628 }
629
630 ///
631 // Get socket option `vmci_buffer_size`.
632 // Available from libzmq 4.2.0.
vmciBufferSize()633 int QZsock::vmciBufferSize ()
634 {
635 int rv = zsock_vmci_buffer_size (self);
636 return rv;
637 }
638
639 ///
640 // Set socket option `vmci_buffer_size`.
641 // Available from libzmq 4.2.0.
setVmciBufferSize(int vmciBufferSize)642 void QZsock::setVmciBufferSize (int vmciBufferSize)
643 {
644 zsock_set_vmci_buffer_size (self, vmciBufferSize);
645
646 }
647
648 ///
649 // Get socket option `vmci_buffer_min_size`.
650 // Available from libzmq 4.2.0.
vmciBufferMinSize()651 int QZsock::vmciBufferMinSize ()
652 {
653 int rv = zsock_vmci_buffer_min_size (self);
654 return rv;
655 }
656
657 ///
658 // Set socket option `vmci_buffer_min_size`.
659 // Available from libzmq 4.2.0.
setVmciBufferMinSize(int vmciBufferMinSize)660 void QZsock::setVmciBufferMinSize (int vmciBufferMinSize)
661 {
662 zsock_set_vmci_buffer_min_size (self, vmciBufferMinSize);
663
664 }
665
666 ///
667 // Get socket option `vmci_buffer_max_size`.
668 // Available from libzmq 4.2.0.
vmciBufferMaxSize()669 int QZsock::vmciBufferMaxSize ()
670 {
671 int rv = zsock_vmci_buffer_max_size (self);
672 return rv;
673 }
674
675 ///
676 // Set socket option `vmci_buffer_max_size`.
677 // Available from libzmq 4.2.0.
setVmciBufferMaxSize(int vmciBufferMaxSize)678 void QZsock::setVmciBufferMaxSize (int vmciBufferMaxSize)
679 {
680 zsock_set_vmci_buffer_max_size (self, vmciBufferMaxSize);
681
682 }
683
684 ///
685 // Get socket option `vmci_connect_timeout`.
686 // Available from libzmq 4.2.0.
vmciConnectTimeout()687 int QZsock::vmciConnectTimeout ()
688 {
689 int rv = zsock_vmci_connect_timeout (self);
690 return rv;
691 }
692
693 ///
694 // Set socket option `vmci_connect_timeout`.
695 // Available from libzmq 4.2.0.
setVmciConnectTimeout(int vmciConnectTimeout)696 void QZsock::setVmciConnectTimeout (int vmciConnectTimeout)
697 {
698 zsock_set_vmci_connect_timeout (self, vmciConnectTimeout);
699
700 }
701
702 ///
703 // Get socket option `tos`.
704 // Available from libzmq 4.1.0.
tos()705 int QZsock::tos ()
706 {
707 int rv = zsock_tos (self);
708 return rv;
709 }
710
711 ///
712 // Set socket option `tos`.
713 // Available from libzmq 4.1.0.
setTos(int tos)714 void QZsock::setTos (int tos)
715 {
716 zsock_set_tos (self, tos);
717
718 }
719
720 ///
721 // Set socket option `router_handover`.
722 // Available from libzmq 4.1.0.
setRouterHandover(int routerHandover)723 void QZsock::setRouterHandover (int routerHandover)
724 {
725 zsock_set_router_handover (self, routerHandover);
726
727 }
728
729 ///
730 // Set socket option `connect_rid`.
731 // Available from libzmq 4.1.0.
setConnectRid(const QString & connectRid)732 void QZsock::setConnectRid (const QString &connectRid)
733 {
734 zsock_set_connect_rid (self, connectRid.toUtf8().data());
735
736 }
737
738 ///
739 // Set socket option `connect_rid` from 32-octet binary
740 // Available from libzmq 4.1.0.
setConnectRidBin(const byte * connectRid)741 void QZsock::setConnectRidBin (const byte *connectRid)
742 {
743 zsock_set_connect_rid_bin (self, connectRid);
744
745 }
746
747 ///
748 // Get socket option `handshake_ivl`.
749 // Available from libzmq 4.1.0.
handshakeIvl()750 int QZsock::handshakeIvl ()
751 {
752 int rv = zsock_handshake_ivl (self);
753 return rv;
754 }
755
756 ///
757 // Set socket option `handshake_ivl`.
758 // Available from libzmq 4.1.0.
setHandshakeIvl(int handshakeIvl)759 void QZsock::setHandshakeIvl (int handshakeIvl)
760 {
761 zsock_set_handshake_ivl (self, handshakeIvl);
762
763 }
764
765 ///
766 // Get socket option `socks_proxy`.
767 // Available from libzmq 4.1.0.
socksProxy()768 QString QZsock::socksProxy ()
769 {
770 char *retStr_ = zsock_socks_proxy (self);
771 QString rv = QString (retStr_);
772 zstr_free (&retStr_);
773 return rv;
774 }
775
776 ///
777 // Set socket option `socks_proxy`.
778 // Available from libzmq 4.1.0.
setSocksProxy(const QString & socksProxy)779 void QZsock::setSocksProxy (const QString &socksProxy)
780 {
781 zsock_set_socks_proxy (self, socksProxy.toUtf8().data());
782
783 }
784
785 ///
786 // Set socket option `xpub_nodrop`.
787 // Available from libzmq 4.1.0.
setXpubNodrop(int xpubNodrop)788 void QZsock::setXpubNodrop (int xpubNodrop)
789 {
790 zsock_set_xpub_nodrop (self, xpubNodrop);
791
792 }
793
794 ///
795 // Set socket option `router_mandatory`.
796 // Available from libzmq 4.0.0.
setRouterMandatory(int routerMandatory)797 void QZsock::setRouterMandatory (int routerMandatory)
798 {
799 zsock_set_router_mandatory (self, routerMandatory);
800
801 }
802
803 ///
804 // Set socket option `probe_router`.
805 // Available from libzmq 4.0.0.
setProbeRouter(int probeRouter)806 void QZsock::setProbeRouter (int probeRouter)
807 {
808 zsock_set_probe_router (self, probeRouter);
809
810 }
811
812 ///
813 // Set socket option `req_relaxed`.
814 // Available from libzmq 4.0.0.
setReqRelaxed(int reqRelaxed)815 void QZsock::setReqRelaxed (int reqRelaxed)
816 {
817 zsock_set_req_relaxed (self, reqRelaxed);
818
819 }
820
821 ///
822 // Set socket option `req_correlate`.
823 // Available from libzmq 4.0.0.
setReqCorrelate(int reqCorrelate)824 void QZsock::setReqCorrelate (int reqCorrelate)
825 {
826 zsock_set_req_correlate (self, reqCorrelate);
827
828 }
829
830 ///
831 // Set socket option `conflate`.
832 // Available from libzmq 4.0.0.
setConflate(int conflate)833 void QZsock::setConflate (int conflate)
834 {
835 zsock_set_conflate (self, conflate);
836
837 }
838
839 ///
840 // Get socket option `zap_domain`.
841 // Available from libzmq 4.0.0.
zapDomain()842 QString QZsock::zapDomain ()
843 {
844 char *retStr_ = zsock_zap_domain (self);
845 QString rv = QString (retStr_);
846 zstr_free (&retStr_);
847 return rv;
848 }
849
850 ///
851 // Set socket option `zap_domain`.
852 // Available from libzmq 4.0.0.
setZapDomain(const QString & zapDomain)853 void QZsock::setZapDomain (const QString &zapDomain)
854 {
855 zsock_set_zap_domain (self, zapDomain.toUtf8().data());
856
857 }
858
859 ///
860 // Get socket option `mechanism`.
861 // Available from libzmq 4.0.0.
mechanism()862 int QZsock::mechanism ()
863 {
864 int rv = zsock_mechanism (self);
865 return rv;
866 }
867
868 ///
869 // Get socket option `plain_server`.
870 // Available from libzmq 4.0.0.
plainServer()871 int QZsock::plainServer ()
872 {
873 int rv = zsock_plain_server (self);
874 return rv;
875 }
876
877 ///
878 // Set socket option `plain_server`.
879 // Available from libzmq 4.0.0.
setPlainServer(int plainServer)880 void QZsock::setPlainServer (int plainServer)
881 {
882 zsock_set_plain_server (self, plainServer);
883
884 }
885
886 ///
887 // Get socket option `plain_username`.
888 // Available from libzmq 4.0.0.
plainUsername()889 QString QZsock::plainUsername ()
890 {
891 char *retStr_ = zsock_plain_username (self);
892 QString rv = QString (retStr_);
893 zstr_free (&retStr_);
894 return rv;
895 }
896
897 ///
898 // Set socket option `plain_username`.
899 // Available from libzmq 4.0.0.
setPlainUsername(const QString & plainUsername)900 void QZsock::setPlainUsername (const QString &plainUsername)
901 {
902 zsock_set_plain_username (self, plainUsername.toUtf8().data());
903
904 }
905
906 ///
907 // Get socket option `plain_password`.
908 // Available from libzmq 4.0.0.
plainPassword()909 QString QZsock::plainPassword ()
910 {
911 char *retStr_ = zsock_plain_password (self);
912 QString rv = QString (retStr_);
913 zstr_free (&retStr_);
914 return rv;
915 }
916
917 ///
918 // Set socket option `plain_password`.
919 // Available from libzmq 4.0.0.
setPlainPassword(const QString & plainPassword)920 void QZsock::setPlainPassword (const QString &plainPassword)
921 {
922 zsock_set_plain_password (self, plainPassword.toUtf8().data());
923
924 }
925
926 ///
927 // Get socket option `curve_server`.
928 // Available from libzmq 4.0.0.
curveServer()929 int QZsock::curveServer ()
930 {
931 int rv = zsock_curve_server (self);
932 return rv;
933 }
934
935 ///
936 // Set socket option `curve_server`.
937 // Available from libzmq 4.0.0.
setCurveServer(int curveServer)938 void QZsock::setCurveServer (int curveServer)
939 {
940 zsock_set_curve_server (self, curveServer);
941
942 }
943
944 ///
945 // Get socket option `curve_publickey`.
946 // Available from libzmq 4.0.0.
curvePublickey()947 QString QZsock::curvePublickey ()
948 {
949 char *retStr_ = zsock_curve_publickey (self);
950 QString rv = QString (retStr_);
951 zstr_free (&retStr_);
952 return rv;
953 }
954
955 ///
956 // Set socket option `curve_publickey`.
957 // Available from libzmq 4.0.0.
setCurvePublickey(const QString & curvePublickey)958 void QZsock::setCurvePublickey (const QString &curvePublickey)
959 {
960 zsock_set_curve_publickey (self, curvePublickey.toUtf8().data());
961
962 }
963
964 ///
965 // Set socket option `curve_publickey` from 32-octet binary
966 // Available from libzmq 4.0.0.
setCurvePublickeyBin(const byte * curvePublickey)967 void QZsock::setCurvePublickeyBin (const byte *curvePublickey)
968 {
969 zsock_set_curve_publickey_bin (self, curvePublickey);
970
971 }
972
973 ///
974 // Get socket option `curve_secretkey`.
975 // Available from libzmq 4.0.0.
curveSecretkey()976 QString QZsock::curveSecretkey ()
977 {
978 char *retStr_ = zsock_curve_secretkey (self);
979 QString rv = QString (retStr_);
980 zstr_free (&retStr_);
981 return rv;
982 }
983
984 ///
985 // Set socket option `curve_secretkey`.
986 // Available from libzmq 4.0.0.
setCurveSecretkey(const QString & curveSecretkey)987 void QZsock::setCurveSecretkey (const QString &curveSecretkey)
988 {
989 zsock_set_curve_secretkey (self, curveSecretkey.toUtf8().data());
990
991 }
992
993 ///
994 // Set socket option `curve_secretkey` from 32-octet binary
995 // Available from libzmq 4.0.0.
setCurveSecretkeyBin(const byte * curveSecretkey)996 void QZsock::setCurveSecretkeyBin (const byte *curveSecretkey)
997 {
998 zsock_set_curve_secretkey_bin (self, curveSecretkey);
999
1000 }
1001
1002 ///
1003 // Get socket option `curve_serverkey`.
1004 // Available from libzmq 4.0.0.
curveServerkey()1005 QString QZsock::curveServerkey ()
1006 {
1007 char *retStr_ = zsock_curve_serverkey (self);
1008 QString rv = QString (retStr_);
1009 zstr_free (&retStr_);
1010 return rv;
1011 }
1012
1013 ///
1014 // Set socket option `curve_serverkey`.
1015 // Available from libzmq 4.0.0.
setCurveServerkey(const QString & curveServerkey)1016 void QZsock::setCurveServerkey (const QString &curveServerkey)
1017 {
1018 zsock_set_curve_serverkey (self, curveServerkey.toUtf8().data());
1019
1020 }
1021
1022 ///
1023 // Set socket option `curve_serverkey` from 32-octet binary
1024 // Available from libzmq 4.0.0.
setCurveServerkeyBin(const byte * curveServerkey)1025 void QZsock::setCurveServerkeyBin (const byte *curveServerkey)
1026 {
1027 zsock_set_curve_serverkey_bin (self, curveServerkey);
1028
1029 }
1030
1031 ///
1032 // Get socket option `gssapi_server`.
1033 // Available from libzmq 4.0.0.
gssapiServer()1034 int QZsock::gssapiServer ()
1035 {
1036 int rv = zsock_gssapi_server (self);
1037 return rv;
1038 }
1039
1040 ///
1041 // Set socket option `gssapi_server`.
1042 // Available from libzmq 4.0.0.
setGssapiServer(int gssapiServer)1043 void QZsock::setGssapiServer (int gssapiServer)
1044 {
1045 zsock_set_gssapi_server (self, gssapiServer);
1046
1047 }
1048
1049 ///
1050 // Get socket option `gssapi_plaintext`.
1051 // Available from libzmq 4.0.0.
gssapiPlaintext()1052 int QZsock::gssapiPlaintext ()
1053 {
1054 int rv = zsock_gssapi_plaintext (self);
1055 return rv;
1056 }
1057
1058 ///
1059 // Set socket option `gssapi_plaintext`.
1060 // Available from libzmq 4.0.0.
setGssapiPlaintext(int gssapiPlaintext)1061 void QZsock::setGssapiPlaintext (int gssapiPlaintext)
1062 {
1063 zsock_set_gssapi_plaintext (self, gssapiPlaintext);
1064
1065 }
1066
1067 ///
1068 // Get socket option `gssapi_principal`.
1069 // Available from libzmq 4.0.0.
gssapiPrincipal()1070 QString QZsock::gssapiPrincipal ()
1071 {
1072 char *retStr_ = zsock_gssapi_principal (self);
1073 QString rv = QString (retStr_);
1074 zstr_free (&retStr_);
1075 return rv;
1076 }
1077
1078 ///
1079 // Set socket option `gssapi_principal`.
1080 // Available from libzmq 4.0.0.
setGssapiPrincipal(const QString & gssapiPrincipal)1081 void QZsock::setGssapiPrincipal (const QString &gssapiPrincipal)
1082 {
1083 zsock_set_gssapi_principal (self, gssapiPrincipal.toUtf8().data());
1084
1085 }
1086
1087 ///
1088 // Get socket option `gssapi_service_principal`.
1089 // Available from libzmq 4.0.0.
gssapiServicePrincipal()1090 QString QZsock::gssapiServicePrincipal ()
1091 {
1092 char *retStr_ = zsock_gssapi_service_principal (self);
1093 QString rv = QString (retStr_);
1094 zstr_free (&retStr_);
1095 return rv;
1096 }
1097
1098 ///
1099 // Set socket option `gssapi_service_principal`.
1100 // Available from libzmq 4.0.0.
setGssapiServicePrincipal(const QString & gssapiServicePrincipal)1101 void QZsock::setGssapiServicePrincipal (const QString &gssapiServicePrincipal)
1102 {
1103 zsock_set_gssapi_service_principal (self, gssapiServicePrincipal.toUtf8().data());
1104
1105 }
1106
1107 ///
1108 // Get socket option `ipv6`.
1109 // Available from libzmq 4.0.0.
ipv6()1110 int QZsock::ipv6 ()
1111 {
1112 int rv = zsock_ipv6 (self);
1113 return rv;
1114 }
1115
1116 ///
1117 // Set socket option `ipv6`.
1118 // Available from libzmq 4.0.0.
setIpv6(int ipv6)1119 void QZsock::setIpv6 (int ipv6)
1120 {
1121 zsock_set_ipv6 (self, ipv6);
1122
1123 }
1124
1125 ///
1126 // Get socket option `immediate`.
1127 // Available from libzmq 4.0.0.
immediate()1128 int QZsock::immediate ()
1129 {
1130 int rv = zsock_immediate (self);
1131 return rv;
1132 }
1133
1134 ///
1135 // Set socket option `immediate`.
1136 // Available from libzmq 4.0.0.
setImmediate(int immediate)1137 void QZsock::setImmediate (int immediate)
1138 {
1139 zsock_set_immediate (self, immediate);
1140
1141 }
1142
1143 ///
1144 // Get socket option `sndhwm`.
1145 // Available from libzmq 3.0.0.
sndhwm()1146 int QZsock::sndhwm ()
1147 {
1148 int rv = zsock_sndhwm (self);
1149 return rv;
1150 }
1151
1152 ///
1153 // Set socket option `sndhwm`.
1154 // Available from libzmq 3.0.0.
setSndhwm(int sndhwm)1155 void QZsock::setSndhwm (int sndhwm)
1156 {
1157 zsock_set_sndhwm (self, sndhwm);
1158
1159 }
1160
1161 ///
1162 // Get socket option `rcvhwm`.
1163 // Available from libzmq 3.0.0.
rcvhwm()1164 int QZsock::rcvhwm ()
1165 {
1166 int rv = zsock_rcvhwm (self);
1167 return rv;
1168 }
1169
1170 ///
1171 // Set socket option `rcvhwm`.
1172 // Available from libzmq 3.0.0.
setRcvhwm(int rcvhwm)1173 void QZsock::setRcvhwm (int rcvhwm)
1174 {
1175 zsock_set_rcvhwm (self, rcvhwm);
1176
1177 }
1178
1179 ///
1180 // Get socket option `maxmsgsize`.
1181 // Available from libzmq 3.0.0.
maxmsgsize()1182 int QZsock::maxmsgsize ()
1183 {
1184 int rv = zsock_maxmsgsize (self);
1185 return rv;
1186 }
1187
1188 ///
1189 // Set socket option `maxmsgsize`.
1190 // Available from libzmq 3.0.0.
setMaxmsgsize(int maxmsgsize)1191 void QZsock::setMaxmsgsize (int maxmsgsize)
1192 {
1193 zsock_set_maxmsgsize (self, maxmsgsize);
1194
1195 }
1196
1197 ///
1198 // Get socket option `multicast_hops`.
1199 // Available from libzmq 3.0.0.
multicastHops()1200 int QZsock::multicastHops ()
1201 {
1202 int rv = zsock_multicast_hops (self);
1203 return rv;
1204 }
1205
1206 ///
1207 // Set socket option `multicast_hops`.
1208 // Available from libzmq 3.0.0.
setMulticastHops(int multicastHops)1209 void QZsock::setMulticastHops (int multicastHops)
1210 {
1211 zsock_set_multicast_hops (self, multicastHops);
1212
1213 }
1214
1215 ///
1216 // Set socket option `xpub_verbose`.
1217 // Available from libzmq 3.0.0.
setXpubVerbose(int xpubVerbose)1218 void QZsock::setXpubVerbose (int xpubVerbose)
1219 {
1220 zsock_set_xpub_verbose (self, xpubVerbose);
1221
1222 }
1223
1224 ///
1225 // Get socket option `tcp_keepalive`.
1226 // Available from libzmq 3.0.0.
tcpKeepalive()1227 int QZsock::tcpKeepalive ()
1228 {
1229 int rv = zsock_tcp_keepalive (self);
1230 return rv;
1231 }
1232
1233 ///
1234 // Set socket option `tcp_keepalive`.
1235 // Available from libzmq 3.0.0.
setTcpKeepalive(int tcpKeepalive)1236 void QZsock::setTcpKeepalive (int tcpKeepalive)
1237 {
1238 zsock_set_tcp_keepalive (self, tcpKeepalive);
1239
1240 }
1241
1242 ///
1243 // Get socket option `tcp_keepalive_idle`.
1244 // Available from libzmq 3.0.0.
tcpKeepaliveIdle()1245 int QZsock::tcpKeepaliveIdle ()
1246 {
1247 int rv = zsock_tcp_keepalive_idle (self);
1248 return rv;
1249 }
1250
1251 ///
1252 // Set socket option `tcp_keepalive_idle`.
1253 // Available from libzmq 3.0.0.
setTcpKeepaliveIdle(int tcpKeepaliveIdle)1254 void QZsock::setTcpKeepaliveIdle (int tcpKeepaliveIdle)
1255 {
1256 zsock_set_tcp_keepalive_idle (self, tcpKeepaliveIdle);
1257
1258 }
1259
1260 ///
1261 // Get socket option `tcp_keepalive_cnt`.
1262 // Available from libzmq 3.0.0.
tcpKeepaliveCnt()1263 int QZsock::tcpKeepaliveCnt ()
1264 {
1265 int rv = zsock_tcp_keepalive_cnt (self);
1266 return rv;
1267 }
1268
1269 ///
1270 // Set socket option `tcp_keepalive_cnt`.
1271 // Available from libzmq 3.0.0.
setTcpKeepaliveCnt(int tcpKeepaliveCnt)1272 void QZsock::setTcpKeepaliveCnt (int tcpKeepaliveCnt)
1273 {
1274 zsock_set_tcp_keepalive_cnt (self, tcpKeepaliveCnt);
1275
1276 }
1277
1278 ///
1279 // Get socket option `tcp_keepalive_intvl`.
1280 // Available from libzmq 3.0.0.
tcpKeepaliveIntvl()1281 int QZsock::tcpKeepaliveIntvl ()
1282 {
1283 int rv = zsock_tcp_keepalive_intvl (self);
1284 return rv;
1285 }
1286
1287 ///
1288 // Set socket option `tcp_keepalive_intvl`.
1289 // Available from libzmq 3.0.0.
setTcpKeepaliveIntvl(int tcpKeepaliveIntvl)1290 void QZsock::setTcpKeepaliveIntvl (int tcpKeepaliveIntvl)
1291 {
1292 zsock_set_tcp_keepalive_intvl (self, tcpKeepaliveIntvl);
1293
1294 }
1295
1296 ///
1297 // Get socket option `tcp_accept_filter`.
1298 // Available from libzmq 3.0.0.
tcpAcceptFilter()1299 QString QZsock::tcpAcceptFilter ()
1300 {
1301 char *retStr_ = zsock_tcp_accept_filter (self);
1302 QString rv = QString (retStr_);
1303 zstr_free (&retStr_);
1304 return rv;
1305 }
1306
1307 ///
1308 // Set socket option `tcp_accept_filter`.
1309 // Available from libzmq 3.0.0.
setTcpAcceptFilter(const QString & tcpAcceptFilter)1310 void QZsock::setTcpAcceptFilter (const QString &tcpAcceptFilter)
1311 {
1312 zsock_set_tcp_accept_filter (self, tcpAcceptFilter.toUtf8().data());
1313
1314 }
1315
1316 ///
1317 // Get socket option `last_endpoint`.
1318 // Available from libzmq 3.0.0.
lastEndpoint()1319 QString QZsock::lastEndpoint ()
1320 {
1321 char *retStr_ = zsock_last_endpoint (self);
1322 QString rv = QString (retStr_);
1323 zstr_free (&retStr_);
1324 return rv;
1325 }
1326
1327 ///
1328 // Set socket option `router_raw`.
1329 // Available from libzmq 3.0.0.
setRouterRaw(int routerRaw)1330 void QZsock::setRouterRaw (int routerRaw)
1331 {
1332 zsock_set_router_raw (self, routerRaw);
1333
1334 }
1335
1336 ///
1337 // Get socket option `ipv4only`.
1338 // Available from libzmq 3.0.0.
ipv4only()1339 int QZsock::ipv4only ()
1340 {
1341 int rv = zsock_ipv4only (self);
1342 return rv;
1343 }
1344
1345 ///
1346 // Set socket option `ipv4only`.
1347 // Available from libzmq 3.0.0.
setIpv4only(int ipv4only)1348 void QZsock::setIpv4only (int ipv4only)
1349 {
1350 zsock_set_ipv4only (self, ipv4only);
1351
1352 }
1353
1354 ///
1355 // Set socket option `delay_attach_on_connect`.
1356 // Available from libzmq 3.0.0.
setDelayAttachOnConnect(int delayAttachOnConnect)1357 void QZsock::setDelayAttachOnConnect (int delayAttachOnConnect)
1358 {
1359 zsock_set_delay_attach_on_connect (self, delayAttachOnConnect);
1360
1361 }
1362
1363 ///
1364 // Get socket option `hwm`.
1365 // Available from libzmq 2.0.0 to 3.0.0.
hwm()1366 int QZsock::hwm ()
1367 {
1368 int rv = zsock_hwm (self);
1369 return rv;
1370 }
1371
1372 ///
1373 // Set socket option `hwm`.
1374 // Available from libzmq 2.0.0 to 3.0.0.
setHwm(int hwm)1375 void QZsock::setHwm (int hwm)
1376 {
1377 zsock_set_hwm (self, hwm);
1378
1379 }
1380
1381 ///
1382 // Get socket option `swap`.
1383 // Available from libzmq 2.0.0 to 3.0.0.
swap()1384 int QZsock::swap ()
1385 {
1386 int rv = zsock_swap (self);
1387 return rv;
1388 }
1389
1390 ///
1391 // Set socket option `swap`.
1392 // Available from libzmq 2.0.0 to 3.0.0.
setSwap(int swap)1393 void QZsock::setSwap (int swap)
1394 {
1395 zsock_set_swap (self, swap);
1396
1397 }
1398
1399 ///
1400 // Get socket option `affinity`.
1401 // Available from libzmq 2.0.0.
affinity()1402 int QZsock::affinity ()
1403 {
1404 int rv = zsock_affinity (self);
1405 return rv;
1406 }
1407
1408 ///
1409 // Set socket option `affinity`.
1410 // Available from libzmq 2.0.0.
setAffinity(int affinity)1411 void QZsock::setAffinity (int affinity)
1412 {
1413 zsock_set_affinity (self, affinity);
1414
1415 }
1416
1417 ///
1418 // Get socket option `identity`.
1419 // Available from libzmq 2.0.0.
identity()1420 QString QZsock::identity ()
1421 {
1422 char *retStr_ = zsock_identity (self);
1423 QString rv = QString (retStr_);
1424 zstr_free (&retStr_);
1425 return rv;
1426 }
1427
1428 ///
1429 // Set socket option `identity`.
1430 // Available from libzmq 2.0.0.
setIdentity(const QString & identity)1431 void QZsock::setIdentity (const QString &identity)
1432 {
1433 zsock_set_identity (self, identity.toUtf8().data());
1434
1435 }
1436
1437 ///
1438 // Get socket option `rate`.
1439 // Available from libzmq 2.0.0.
rate()1440 int QZsock::rate ()
1441 {
1442 int rv = zsock_rate (self);
1443 return rv;
1444 }
1445
1446 ///
1447 // Set socket option `rate`.
1448 // Available from libzmq 2.0.0.
setRate(int rate)1449 void QZsock::setRate (int rate)
1450 {
1451 zsock_set_rate (self, rate);
1452
1453 }
1454
1455 ///
1456 // Get socket option `recovery_ivl`.
1457 // Available from libzmq 2.0.0.
recoveryIvl()1458 int QZsock::recoveryIvl ()
1459 {
1460 int rv = zsock_recovery_ivl (self);
1461 return rv;
1462 }
1463
1464 ///
1465 // Set socket option `recovery_ivl`.
1466 // Available from libzmq 2.0.0.
setRecoveryIvl(int recoveryIvl)1467 void QZsock::setRecoveryIvl (int recoveryIvl)
1468 {
1469 zsock_set_recovery_ivl (self, recoveryIvl);
1470
1471 }
1472
1473 ///
1474 // Get socket option `recovery_ivl_msec`.
1475 // Available from libzmq 2.0.0 to 3.0.0.
recoveryIvlMsec()1476 int QZsock::recoveryIvlMsec ()
1477 {
1478 int rv = zsock_recovery_ivl_msec (self);
1479 return rv;
1480 }
1481
1482 ///
1483 // Set socket option `recovery_ivl_msec`.
1484 // Available from libzmq 2.0.0 to 3.0.0.
setRecoveryIvlMsec(int recoveryIvlMsec)1485 void QZsock::setRecoveryIvlMsec (int recoveryIvlMsec)
1486 {
1487 zsock_set_recovery_ivl_msec (self, recoveryIvlMsec);
1488
1489 }
1490
1491 ///
1492 // Get socket option `mcast_loop`.
1493 // Available from libzmq 2.0.0 to 3.0.0.
mcastLoop()1494 int QZsock::mcastLoop ()
1495 {
1496 int rv = zsock_mcast_loop (self);
1497 return rv;
1498 }
1499
1500 ///
1501 // Set socket option `mcast_loop`.
1502 // Available from libzmq 2.0.0 to 3.0.0.
setMcastLoop(int mcastLoop)1503 void QZsock::setMcastLoop (int mcastLoop)
1504 {
1505 zsock_set_mcast_loop (self, mcastLoop);
1506
1507 }
1508
1509 ///
1510 // Get socket option `rcvtimeo`.
1511 // Available from libzmq 2.2.0.
rcvtimeo()1512 int QZsock::rcvtimeo ()
1513 {
1514 int rv = zsock_rcvtimeo (self);
1515 return rv;
1516 }
1517
1518 ///
1519 // Set socket option `rcvtimeo`.
1520 // Available from libzmq 2.2.0.
setRcvtimeo(int rcvtimeo)1521 void QZsock::setRcvtimeo (int rcvtimeo)
1522 {
1523 zsock_set_rcvtimeo (self, rcvtimeo);
1524
1525 }
1526
1527 ///
1528 // Get socket option `sndtimeo`.
1529 // Available from libzmq 2.2.0.
sndtimeo()1530 int QZsock::sndtimeo ()
1531 {
1532 int rv = zsock_sndtimeo (self);
1533 return rv;
1534 }
1535
1536 ///
1537 // Set socket option `sndtimeo`.
1538 // Available from libzmq 2.2.0.
setSndtimeo(int sndtimeo)1539 void QZsock::setSndtimeo (int sndtimeo)
1540 {
1541 zsock_set_sndtimeo (self, sndtimeo);
1542
1543 }
1544
1545 ///
1546 // Get socket option `sndbuf`.
1547 // Available from libzmq 2.0.0.
sndbuf()1548 int QZsock::sndbuf ()
1549 {
1550 int rv = zsock_sndbuf (self);
1551 return rv;
1552 }
1553
1554 ///
1555 // Set socket option `sndbuf`.
1556 // Available from libzmq 2.0.0.
setSndbuf(int sndbuf)1557 void QZsock::setSndbuf (int sndbuf)
1558 {
1559 zsock_set_sndbuf (self, sndbuf);
1560
1561 }
1562
1563 ///
1564 // Get socket option `rcvbuf`.
1565 // Available from libzmq 2.0.0.
rcvbuf()1566 int QZsock::rcvbuf ()
1567 {
1568 int rv = zsock_rcvbuf (self);
1569 return rv;
1570 }
1571
1572 ///
1573 // Set socket option `rcvbuf`.
1574 // Available from libzmq 2.0.0.
setRcvbuf(int rcvbuf)1575 void QZsock::setRcvbuf (int rcvbuf)
1576 {
1577 zsock_set_rcvbuf (self, rcvbuf);
1578
1579 }
1580
1581 ///
1582 // Get socket option `linger`.
1583 // Available from libzmq 2.0.0.
linger()1584 int QZsock::linger ()
1585 {
1586 int rv = zsock_linger (self);
1587 return rv;
1588 }
1589
1590 ///
1591 // Set socket option `linger`.
1592 // Available from libzmq 2.0.0.
setLinger(int linger)1593 void QZsock::setLinger (int linger)
1594 {
1595 zsock_set_linger (self, linger);
1596
1597 }
1598
1599 ///
1600 // Get socket option `reconnect_ivl`.
1601 // Available from libzmq 2.0.0.
reconnectIvl()1602 int QZsock::reconnectIvl ()
1603 {
1604 int rv = zsock_reconnect_ivl (self);
1605 return rv;
1606 }
1607
1608 ///
1609 // Set socket option `reconnect_ivl`.
1610 // Available from libzmq 2.0.0.
setReconnectIvl(int reconnectIvl)1611 void QZsock::setReconnectIvl (int reconnectIvl)
1612 {
1613 zsock_set_reconnect_ivl (self, reconnectIvl);
1614
1615 }
1616
1617 ///
1618 // Get socket option `reconnect_ivl_max`.
1619 // Available from libzmq 2.0.0.
reconnectIvlMax()1620 int QZsock::reconnectIvlMax ()
1621 {
1622 int rv = zsock_reconnect_ivl_max (self);
1623 return rv;
1624 }
1625
1626 ///
1627 // Set socket option `reconnect_ivl_max`.
1628 // Available from libzmq 2.0.0.
setReconnectIvlMax(int reconnectIvlMax)1629 void QZsock::setReconnectIvlMax (int reconnectIvlMax)
1630 {
1631 zsock_set_reconnect_ivl_max (self, reconnectIvlMax);
1632
1633 }
1634
1635 ///
1636 // Get socket option `backlog`.
1637 // Available from libzmq 2.0.0.
backlog()1638 int QZsock::backlog ()
1639 {
1640 int rv = zsock_backlog (self);
1641 return rv;
1642 }
1643
1644 ///
1645 // Set socket option `backlog`.
1646 // Available from libzmq 2.0.0.
setBacklog(int backlog)1647 void QZsock::setBacklog (int backlog)
1648 {
1649 zsock_set_backlog (self, backlog);
1650
1651 }
1652
1653 ///
1654 // Set socket option `subscribe`.
1655 // Available from libzmq 2.0.0.
setSubscribe(const QString & subscribe)1656 void QZsock::setSubscribe (const QString &subscribe)
1657 {
1658 zsock_set_subscribe (self, subscribe.toUtf8().data());
1659
1660 }
1661
1662 ///
1663 // Set socket option `unsubscribe`.
1664 // Available from libzmq 2.0.0.
setUnsubscribe(const QString & unsubscribe)1665 void QZsock::setUnsubscribe (const QString &unsubscribe)
1666 {
1667 zsock_set_unsubscribe (self, unsubscribe.toUtf8().data());
1668
1669 }
1670
1671 ///
1672 // Get socket option `type`.
1673 // Available from libzmq 2.0.0.
type()1674 int QZsock::type ()
1675 {
1676 int rv = zsock_type (self);
1677 return rv;
1678 }
1679
1680 ///
1681 // Get socket option `rcvmore`.
1682 // Available from libzmq 2.0.0.
rcvmore()1683 int QZsock::rcvmore ()
1684 {
1685 int rv = zsock_rcvmore (self);
1686 return rv;
1687 }
1688
1689 ///
1690 // Get socket option `fd`.
1691 // Available from libzmq 2.0.0.
fd()1692 SOCKET QZsock::fd ()
1693 {
1694 SOCKET rv = zsock_fd (self);
1695 return rv;
1696 }
1697
1698 ///
1699 // Get socket option `events`.
1700 // Available from libzmq 2.0.0.
events()1701 int QZsock::events ()
1702 {
1703 int rv = zsock_events (self);
1704 return rv;
1705 }
1706
1707 ///
1708 // Self test of this class.
test(bool verbose)1709 void QZsock::test (bool verbose)
1710 {
1711 zsock_test (verbose);
1712
1713 }
1714 /*
1715 ################################################################################
1716 # THIS FILE IS 100% GENERATED BY ZPROJECT; DO NOT EDIT EXCEPT EXPERIMENTALLY #
1717 # Read the zproject/README.md for information about making permanent changes. #
1718 ################################################################################
1719 */
1720