/** * @since 3.0.0 */ public void setRcvHWM(long rcvHWM) { if (ZMQ.version_full() < ZMQ.make_version(3, 0, 0)) return; setLongSockopt(RCVHWM, rcvHWM); }
public void setReqRelaxed(boolean isRelaxed) { if (ZMQ.version_full() >= ZMQ.make_version(4, 0, 0)) { setLongSockopt(REQ_RELAXED, isRelaxed ? 1L : 0L); } }
/** * Sets if the socket is for a server using the PLAIN security mechanism. * @see <a href="http://rfc.zeromq.org/spec:24">PLAIN RFC</a> * @param plain whether or not to use PLAIN security * @since 4.0.0 */ public void setPlainServer(boolean plain) { if (ZMQ.version_full() >= ZMQ.make_version(4, 0, 0)) { setLongSockopt(PLAIN_SERVER, plain ? 1L : 0L); } }
/** * The 'ZMQ_IPV4ONLY' option shall set the underlying native socket type. An IPv6 socket lets applications * connect to and accept connections from both IPv4 and IPv6 hosts. * * @param v4only A value of true will use IPv4 sockets, while the value of false will use IPv6 sockets */ public void setIPv4Only(boolean v4only) { setLongSockopt(IPV4ONLY, v4only ? 1L : 0L); }
/** * The 'ZMQ_SNDBUF' option shall set the underlying kernel transmit buffer size for the 'socket' to the * specified size in bytes. A value of zero means leave the OS default unchanged. For details please refer to * your operating system documentation for the 'SO_SNDBUF' socket option. * * @param sndbuf */ public void setSendBufferSize(long sndbuf) { setLongSockopt(SNDBUF, sndbuf); }
/** * @since 3.0.0 */ public void setReconnectIVLMax(long reconnectIVLMax) { if (ZMQ.version_full() < ZMQ.make_version(2, 1, 10)) return; setLongSockopt(RECONNECT_IVL_MAX, reconnectIVLMax); }
/** * @since 3.0.0 */ public void setReconnectIVL(long reconnectIVL) { if (ZMQ.version_full() < ZMQ.make_version(2, 1, 10)) return; setLongSockopt(RECONNECT_IVL, reconnectIVL); }
public void setGSSAPIServer(boolean isServer) { if(ZMQ.version_full() >= ZMQ.makeVersion(4, 1, 0)) { setLongSockopt(GSSAPI_SERVER, isServer ? 1L : 0L); } }
/** * The 'ZMQ_RCVBUF' option shall set the underlying kernel receive buffer size for the 'socket' to the specified * size in bytes. A value of zero means leave the OS default unchanged. For details refer to your operating * system documentation for the 'SO_RCVBUF' socket option. * * @param rcvbuf */ public void setReceiveBufferSize(long rcvbuf) { setLongSockopt(RCVBUF, rcvbuf); }
/** * The 'ZMQ_RATE' option shall set the maximum send or receive data rate for multicast transports such as in the * man page of zmq_pgm[7] using the specified 'socket'. * * @param rate */ public void setRate(long rate) { setLongSockopt(RATE, rate); }
/** * Override TCP_KEEPINTVL socket option (where supported by OS). The default value -1 will skip all overrides * and do the OS default. * * @param optVal The value of 'ZMQ_TCP_KEEPALIVE_INTVL' defines the interval between keepalives. Unit is OS * dependant. */ public void setTCPKeepAliveInterval(long optVal) { if (ZMQ.version_full() >= ZMQ.make_version(3, 2, 0)) setLongSockopt(KEEPALIVEINTVL, optVal); }
/** * Override TCP_KEEPCNT socket option (where supported by OS). The default value -1 will skip all overrides and * do the OS default. * * @param optVal The value of 'ZMQ_TCP_KEEPALIVE_CNT' defines the number of keepalives before death. */ public void setTCPKeepAliveCount(long optVal) { if (ZMQ.version_full() >= ZMQ.make_version(3, 2, 0)) setLongSockopt(KEEPALIVECNT, optVal); }
/** * Override SO_KEEPALIVE socket option (where supported by OS) to enable keep-alive packets for a socket * connection. Possible values are -1, 0, 1. The default value -1 will skip all overrides and do the OS default. * * @param optVal The value of 'ZMQ_TCP_KEEPALIVE' to turn TCP keepalives on (1) or off (0). */ public void setTCPKeepAlive(long optVal) { if (ZMQ.version_full() >= ZMQ.make_version(3, 2, 0)) setLongSockopt(KEEPALIVE, optVal); }
/** * Get the Swap. The 'ZMQ_SWAP' option shall set the disk offload (swap) size for the specified 'socket'. A * socket which has 'ZMQ_SWAP' set to a non-zero value may exceed its high water mark; in this case outstanding * messages shall be offloaded to storage on disk rather than held in memory. * * @param swap The value of 'ZMQ_SWAP' defines the maximum size of the swap space in bytes. */ public void setSwap(long swap) { if (ZMQ.version_full() >= ZMQ.make_version(3, 0, 0)) return; setLongSockopt(SWAP, swap); }
/** * @since 3.0.0 */ public void setBacklog(long backlog) { if (ZMQ.version_full() < ZMQ.make_version(3, 0, 0)) return; setLongSockopt(BACKLOG, backlog); }
public void setReqCorrelate(boolean isCorrelate) { if (ZMQ.version_full() >= ZMQ.make_version(4, 0, 0)) { setLongSockopt(REQ_CORRELATE, isCorrelate ? 1L : 0L); } }
/** * Sets the XPUB socket behavior on new subscriptions and unsubscriptions. * * @param verbose A value of false is the default and passes only new subscription messages to upstream. * A value of true passes all subscription messages upstream. * @since 3.2.2 */ public void setXpubVerbose(boolean verbose) { if (ZMQ.version_full() < ZMQ.make_version(3, 2, 2)) return; setLongSockopt(XPUB_VERBOSE, verbose ? 1L : 0L); }
/** * Override TCP_KEEPCNT (or TCP_KEEPALIVE on some OS) socket option (where supported by OS). The default value * -1 will skip all overrides and do the OS default. * * @param optVal The value of 'ZMQ_TCP_KEEPALIVE_IDLE' defines the interval between the last data packet sent * over the socket and the first keepalive probe. Unit is OS dependant. */ public void setTCPKeepAliveIdle(long optVal) { if (ZMQ.version_full() >= ZMQ.make_version(3, 2, 0)) setLongSockopt(KEEPALIVEIDLE, optVal); }
/** * @since 3.0.0 */ public void setMaxMsgSize(long maxMsgSize) { if (ZMQ.version_full() < ZMQ.make_version(3, 0, 0)) return; setLongSockopt(MAXMSGSIZE, maxMsgSize); }
/** * Sets the time-to-live field in every multicast packet sent from this socket. The default is 1 which means * that the multicast packets don't leave the local network. * * @param mcast_hops */ public void setMulticastHops(long mcast_hops) { if (ZMQ.version_full() < ZMQ.make_version(3, 0, 0)) return; setLongSockopt(MULTICAST_HOPS, mcast_hops); }