Class: ZMQ::Socket::Dealer
- Inherits:
-
ZMQ::Socket
- Object
- ZMQ::Socket
- ZMQ::Socket::Dealer
- Defined in:
- lib/zmq/socket/dealer.rb,
ext/rbczmq/socket.c
Constant Summary collapse
- TYPE_STR =
ZMQ::Socket::Dealer
A socket of type ZMQ::Socket::Dealer is an advanced pattern used for extending request/reply sockets. Each message sent is load-balanced among all connected peers, and each message received is fair-queued from all connected peers.
Previously this socket was called ZMQ_XREQ and that name remains available for backwards compatibility.
When a ZMQ::Socket::Dealer socket enters an exceptional state due to having reached the high water mark for all peers, or if there are no peers at all, then any ZMQ::Socket#send operations on the socket shall block until the exceptional state ends or at least one peer becomes available for sending; messages are not discarded.
When a ZMQ::Socket::Dealer socket is connected to a ZMQ::Socket::Rep socket each message sent must consist of an empty message part, the delimiter, followed by one or more body parts.
Summary of ZMQ::Socket::Dealer characteristics
- Compatible peer sockets
-
ZMQ::Socket::Router, ZMQ::Socket::Request, ZMQ::Socket::Reply
- Direction
-
Bidirectional
- Send/receive pattern
-
Unrestricted
- Outgoing routing strategy
-
Load-balanced
- Incoming routing strategy
-
Fair-queued
- ZMQ_HWM option action
-
Block
"DEALER"
Constants inherited from ZMQ::Socket
BOUND, CONNECTED, DISCONNECTED, PENDING, PROTO_REXP
Instance Method Summary collapse
Methods inherited from ZMQ::Socket
#affinity, #affinity=, #backlog, #backlog=, #bind, #close, #connect, #connect_all, #delay_attach_on_connect=, #disconnect, #endpoint, #endpoints, #events, #fd, handle_fsm_errors, #identity=, #ipv4only=, #ipv4only?, #last_endpoint, #linger, #linger=, #maxmsgsize, #maxmsgsize=, #monitor, #multicast_hops, #multicast_hops=, #poll, #poll_readable?, #poll_writable?, #rate, #rate=, #rcvbuf, #rcvbuf=, #rcvhwm, #rcvhwm=, #rcvmore?, #rcvtimeo, #rcvtimeo=, #readable?, #real_bind, #real_connect, #reconnect_ivl, #reconnect_ivl=, #reconnect_ivl_max, #reconnect_ivl_max=, #recovery_ivl, #recovery_ivl=, #recv, #recv_frame, #recv_frame_nonblock, #recv_message, #recv_nonblock, #router_mandatory=, #router_raw=, #send, #send_frame, #send_message, #sendm, #sndbuf, #sndbuf=, #sndhwm, #sndhwm=, #sndtimeo, #sndtimeo=, #state, #subscribe, #to_s, #type_str, #unbind, #unsubscribe, unsupported_api, #verbose=, #writable?, #xpub_verbose=