Sha256: a76ebf4cd254b20594be80fb9f4332b760a4944990e7b92fc39cb4b48e75e4d0

Contents?: true

Size: 1.99 KB

Versions: 28

Compression:

Stored size: 1.99 KB

Contents

# encoding: utf-8

class ZMQ::Socket::Router

# == ZMQ::Socket::Router
# 
# A socket of type ZMQ::Socket::Router is an advanced pattern used for extending request/reply sockets. When receiving messages
# a ZMQ::Socket::Router socket shall prepend a message part containing the identity of the originating peer to the message before
# passing it to the application. Messages received are fair-queued from among all connected peers. When sending messages a
# ZMQ::Socket::Router socket shall remove the first part of the message and use it to determine the identity of the peer the message
# shall be routed to. If the peer does not exist anymore the message shall be silently discarded.
#
# Previously this socket was called ZMQ_XREP and that name remains available for backwards compatibility.
#
# When a ZMQ::Socket::Router 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 messages sent to the socket shall be dropped until the exceptional state ends. Likewise, any
# messages routed to a non-existent peer or a peer for which the individual high water mark has been reached shall also be dropped.
#
# When a ZMQ::Socket::Request socket is connected to a ZMQ::Socket::Router socket, in addition to the identity of the originating
# peer each message received shall contain an empty delimiter message part. Hence, the entire structure of each received message as
# seen by the application becomes: one or more identity parts, delimiter part, one or more body parts. When sending replies to a
# ZMQ::Socket::Request socket the application must include the delimiter part.
#
# === Summary of ZMQ_ROUTER characteristics
#
# [Compatible peer socket] ZMQ::Socket::Dealer, ZMQ::Socket::Req, ZMQ::Socket::Rep
# [Direction] Bidirectional
# [Send/receive pattern] Unrestricted
# [Outgoing routing strategy] See text
# [Incoming routing strategy] Fair-queued
# [ZMQ::Socket#hwm option action] Drop

  TYPE_STR = "ROUTER"

  def type
    ZMQ::ROUTER
  end
end

Version data entries

28 entries across 28 versions & 1 rubygems

Version Path
rbczmq-1.7.9 lib/zmq/socket/router.rb
rbczmq-1.7.8 lib/zmq/socket/router.rb
rbczmq-1.7.7 lib/zmq/socket/router.rb
rbczmq-1.7.6 lib/zmq/socket/router.rb
rbczmq-1.7.5 lib/zmq/socket/router.rb
rbczmq-1.7.4 lib/zmq/socket/router.rb
rbczmq-1.7.3 lib/zmq/socket/router.rb
rbczmq-1.7.2 lib/zmq/socket/router.rb
rbczmq-1.7.1 lib/zmq/socket/router.rb
rbczmq-1.7.0 lib/zmq/socket/router.rb
rbczmq-1.6.4 lib/zmq/socket/router.rb
rbczmq-1.6.2 lib/zmq/socket/router.rb
rbczmq-1.6 lib/zmq/socket/router.rb
rbczmq-1.5 lib/zmq/socket/router.rb
rbczmq-1.4 lib/zmq/socket/router.rb
rbczmq-1.3 lib/zmq/socket/router.rb
rbczmq-1.2 lib/zmq/socket/router.rb
rbczmq-1.1 lib/zmq/socket/router.rb
rbczmq-1.0 lib/zmq/socket/router.rb
rbczmq-0.9 lib/zmq/socket/router.rb