Class: PipeRpc::Gateway
Instance Method Summary collapse
- #channel ⇒ Object
- #clients ⇒ Object
- #close(reason = 'manually closed') ⇒ Object
- #handle_message ⇒ Object
-
#initialize(args) ⇒ Gateway
constructor
A new instance of Gateway.
- #loop_iteration=(iteration) ⇒ Object
- #off_received(on_received) ⇒ Object
- #off_sent(on_sent) ⇒ Object
- #on_received(&on_received) ⇒ Object
- #on_sent(&on_sent) ⇒ Object
- #servers ⇒ Object
Constructor Details
#initialize(args) ⇒ 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(reason = 'manually closed') ⇒ Object
39 40 41 |
# File 'lib/pipe_rpc/gateway.rb', line 39 def close(reason = 'manually closed') @hub.socket.close(reason) end |
#handle_message ⇒ Object
43 44 45 |
# File 'lib/pipe_rpc/gateway.rb', line 43 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 |
#off_received(on_received) ⇒ Object
35 36 37 |
# File 'lib/pipe_rpc/gateway.rb', line 35 def off_received(on_received) @hub.socket.off_received(on_received) end |
#off_sent(on_sent) ⇒ Object
27 28 29 |
# File 'lib/pipe_rpc/gateway.rb', line 27 def off_sent(on_sent) @hub.socket.off_sent(on_sent) end |
#on_received(&on_received) ⇒ Object
31 32 33 |
# File 'lib/pipe_rpc/gateway.rb', line 31 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 |