Class: ZMQ::Socket::Sub

Inherits:
ZMQ::Socket show all
Includes:
DownstreamSocket
Defined in:
lib/zmq/socket/sub.rb,
ext/rbczmq/socket.c

Constant Summary collapse

TYPE_STR =

ZMQ::Socket::Sub

A socket of type ZMQ::Socket::Sub is used by a subscriber to subscribe to data distributed by a publisher. Initially a ZMQ::Socket::Sub socket is not subscribed to any messages, use ZMQ::Socket#subscribe to specify which messages to subscribe to. The ZMQ::Socket#send function is not implemented for this socket type.

Summary of ZMQ::Socket::Sub characteristics

Compatible peer sockets

ZMQ::Socket::Pub

Direction

Unidirectional

Send/receive pattern

Receive only

Incoming routing strategy

Fair-queued

Outgoing routing strategy

N/A

ZMQ::Socket#hwm option action

Drop

"SUB"

Constants inherited from ZMQ::Socket

BOUND, CONNECTED, PENDING, PROTO_REXP

Instance Method Summary collapse

Methods included from DownstreamSocket

included, #poll_writable?

Methods inherited from ZMQ::Socket

#affinity, #affinity=, #backlog, #backlog=, #bind, #close, #connect, #connect_all, #endpoint, #endpoints, #events, #fd, handle_fsm_errors, #hwm, #hwm=, #identity=, #linger, #linger=, #mcast_loop=, #mcast_loop?, #monitor, #poll_readable?, #poll_writable?, #rate, #rate=, #raw=, #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=, #recovery_ivl_msec, #recovery_ivl_msec=, #recv, #recv_frame, #recv_frame_nonblock, #recv_message, #recv_nonblock, #send, #send_frame, #send_message, #sendm, #sndbuf, #sndbuf=, #sndhwm, #sndhwm=, #sndtimeo, #sndtimeo=, #state, #subscribe, #swap, #swap=, #to_s, #type_str, #unsubscribe, unsupported_api, #verbose=, #writable?

Instance Method Details

#typeObject


22
23
24
# File 'lib/zmq/socket/sub.rb', line 22

def type
  ZMQ::SUB
end