Class: NNQ::PUSH0

Inherits:
Socket show all
Defined in:
lib/nnq/push_pull.rb

Overview

PUSH side of the pipeline pattern (nng push0). Enqueues onto a single bounded send queue (‘send_hwm`); per-peer send pumps work-steal from it. Defaults to dialing.

Instance Attribute Summary

Attributes inherited from Socket

#options

Instance Method Summary collapse

Methods inherited from Socket

#all_peers_gone, bind, #bind, #close, #close_read, connect, #connect, #connection_count, #frozen_binary, #initialize, #last_endpoint, #monitor, #peer_connected, #raw?, #reconnect_enabled, #reconnect_enabled=

Constructor Details

This class inherits a constructor from NNQ::Socket

Instance Method Details

#send(body) ⇒ Object



13
14
15
16
# File 'lib/nnq/push_pull.rb', line 13

def send(body)
  body = frozen_binary(body)
  Reactor.run { @engine.routing.send(body) }
end