Class: PipeRpc::Gateway
Instance Method Summary collapse
- #channel ⇒ Object
- #clients ⇒ Object
- #close ⇒ Object
- #handle_message ⇒ Object
-
#initialize(args) ⇒ Gateway
constructor
A new instance of Gateway.
- #loop_iteration=(iteration) ⇒ Object
- #on_received(&on_received) ⇒ Object
- #on_sent(&on_sent) ⇒ Object
- #servers ⇒ Object
Constructor Details
#initialize(args) ⇒ Gateway
Returns a new instance of Gateway.
3 4 5 |
# File 'lib/pipe_rpc/gateway.rb', line 3 def initialize(args) @hub = Hub.new(args) end |
Instance Method Details
#channel ⇒ Object
7 8 9 |
# File 'lib/pipe_rpc/gateway.rb', line 7 def channel @hub.channel end |
#clients ⇒ Object
15 16 17 |
# File 'lib/pipe_rpc/gateway.rb', line 15 def clients @hub.clients end |
#close ⇒ Object
31 32 33 |
# File 'lib/pipe_rpc/gateway.rb', line 31 def close @hub.socket.close end |
#handle_message ⇒ Object
35 36 37 |
# File 'lib/pipe_rpc/gateway.rb', line 35 def @hub. end |
#loop_iteration=(iteration) ⇒ Object
19 20 21 |
# File 'lib/pipe_rpc/gateway.rb', line 19 def loop_iteration=(iteration) @hub.requests.wait_for_results_through(iteration) end |
#on_received(&on_received) ⇒ Object
27 28 29 |
# File 'lib/pipe_rpc/gateway.rb', line 27 def on_received(&on_received) @hub.socket.on_received(&on_received) end |
#on_sent(&on_sent) ⇒ Object
23 24 25 |
# File 'lib/pipe_rpc/gateway.rb', line 23 def on_sent(&on_sent) @hub.socket.on_sent(&on_sent) end |
#servers ⇒ Object
11 12 13 |
# File 'lib/pipe_rpc/gateway.rb', line 11 def servers @hub.servers end |