Struct tmq::SocketBuilder
source · pub struct SocketBuilder<T> { /* private fields */ }
Expand description
Builder which provides bind
and connect
methods to build a corresponding ZMQ socket as per the standard functions
You can use the standard functions from the crate to create a builder
Use the set_
functions to set socket options before binding/connecting
See ZMQ documentation for more info on what these options do: http://api.zeromq.org/4-2:zmq-setsockopt
Implementations§
source§impl<T> SocketBuilder<T>where
T: FromZmqSocket<T>,
impl<T> SocketBuilder<T>where T: FromZmqSocket<T>,
sourcepub fn connect(self, endpoint: &str) -> Result<T>
pub fn connect(self, endpoint: &str) -> Result<T>
Connect to a ZMQ endpoint at the given address.
sourcepub fn monitor(self, monitor_endpoint: &str, events: i32) -> Self
pub fn monitor(self, monitor_endpoint: &str, events: i32) -> Self
Configure the socket for monitoring
sourcepub fn set_immediate(self, value: bool) -> Self
pub fn set_immediate(self, value: bool) -> Self
Setter for the ZMQ_IMMEDIATE
option.
sourcepub fn set_plain_server(self, value: bool) -> Self
pub fn set_plain_server(self, value: bool) -> Self
Setter for the ZMQ_PLAIN_SERVER
option.
sourcepub fn set_conflate(self, value: bool) -> Self
pub fn set_conflate(self, value: bool) -> Self
Setter for the ZMQ_CONFLATE
option.
sourcepub fn set_probe_router(self, value: bool) -> Self
pub fn set_probe_router(self, value: bool) -> Self
Setter for the ZMQ_PROBE_ROUTER
option.
sourcepub fn set_curve_server(self, value: bool) -> Self
pub fn set_curve_server(self, value: bool) -> Self
Setter for the ZMQ_CURVE_SERVER
option.
sourcepub fn set_gssapi_server(self, value: bool) -> Self
pub fn set_gssapi_server(self, value: bool) -> Self
Setter for the ZMQ_GSSAPI_SERVER
option.
sourcepub fn set_gssapi_plaintext(self, value: bool) -> Self
pub fn set_gssapi_plaintext(self, value: bool) -> Self
Setter for the ZMQ_GSSAPI_PLAINTEXT
option.
sourcepub fn set_maxmsgsize(self, value: i64) -> Self
pub fn set_maxmsgsize(self, value: i64) -> Self
Setter for the ZMQ_MAXMSGSIZE
option.
sourcepub fn set_sndhwm(self, value: i32) -> Self
pub fn set_sndhwm(self, value: i32) -> Self
Setter for the ZMQ_SNDHWM
option.
sourcepub fn set_rcvhwm(self, value: i32) -> Self
pub fn set_rcvhwm(self, value: i32) -> Self
Setter for the ZMQ_RCVHWM
option.
sourcepub fn set_affinity(self, value: u64) -> Self
pub fn set_affinity(self, value: u64) -> Self
Setter for the ZMQ_AFFINITY
option.
sourcepub fn set_recovery_ivl(self, value: i32) -> Self
pub fn set_recovery_ivl(self, value: i32) -> Self
Setter for the ZMQ_RECOVERY_IVL
option.
sourcepub fn set_sndbuf(self, value: i32) -> Self
pub fn set_sndbuf(self, value: i32) -> Self
Setter for the ZMQ_SNDBUF
option.
sourcepub fn set_rcvbuf(self, value: i32) -> Self
pub fn set_rcvbuf(self, value: i32) -> Self
Setter for the ZMQ_RCVBUF
option.
sourcepub fn set_linger(self, value: i32) -> Self
pub fn set_linger(self, value: i32) -> Self
Setter for the ZMQ_LINGER
option.
sourcepub fn set_reconnect_ivl(self, value: i32) -> Self
pub fn set_reconnect_ivl(self, value: i32) -> Self
Setter for the ZMQ_RECONNECT_IVL
option.
sourcepub fn set_reconnect_ivl_max(self, value: i32) -> Self
pub fn set_reconnect_ivl_max(self, value: i32) -> Self
Setter for the ZMQ_RECONNECT_IVL_MAX
option.
sourcepub fn set_backlog(self, value: i32) -> Self
pub fn set_backlog(self, value: i32) -> Self
Setter for the ZMQ_BACKLOG
option.
sourcepub fn set_identity(self, value: &[u8]) -> Self
pub fn set_identity(self, value: &[u8]) -> Self
Setter for the ZMQ_IDENTITY
option.
sourcepub fn set_tcp_keepalive(self, value: i32) -> Self
pub fn set_tcp_keepalive(self, value: i32) -> Self
Setter for the ZMQ_TCP_KEEPALIVE
option.
sourcepub fn set_tcp_keepalive_cnt(self, value: i32) -> Self
pub fn set_tcp_keepalive_cnt(self, value: i32) -> Self
Setter for the ZMQ_TCP_KEEPALIVE_CNT
option.
sourcepub fn set_tcp_keepalive_idle(self, value: i32) -> Self
pub fn set_tcp_keepalive_idle(self, value: i32) -> Self
Setter for the ZMQ_TCP_KEEPALIVE_IDLE
option.
sourcepub fn set_tcp_keepalive_intvl(self, value: i32) -> Self
pub fn set_tcp_keepalive_intvl(self, value: i32) -> Self
Setter for the ZMQ_TCP_KEEPALIVE_INTVL
option.
sourcepub fn set_rcvtimeo(self, value: i32) -> Self
pub fn set_rcvtimeo(self, value: i32) -> Self
Setter for the ZMQ_RCVTIMEO
option.
sourcepub fn set_sndtimeo(self, value: i32) -> Self
pub fn set_sndtimeo(self, value: i32) -> Self
Setter for the ZMQ_SNDTIMEO
option.