Class: PipeRpc::Hub
- Defined in:
- lib/pipe_rpc/hub.rb,
lib/pipe_rpc/hub_message.rb
Defined Under Namespace
Classes: Clients, Message, Request, Requests, Servers, Socket, TransportMapper
Instance Attribute Summary collapse
-
#channel ⇒ Object
readonly
Returns the value of attribute channel.
-
#clients ⇒ Object
readonly
Returns the value of attribute clients.
-
#requests ⇒ Object
readonly
Returns the value of attribute requests.
-
#servers ⇒ Object
readonly
Returns the value of attribute servers.
-
#socket ⇒ Object
readonly
Returns the value of attribute socket.
-
#transport_mapper ⇒ Object
readonly
Returns the value of attribute transport_mapper.
Instance Method Summary collapse
- #handle_message ⇒ Object
-
#initialize(gateway, channels) ⇒ Hub
constructor
A new instance of Hub.
Constructor Details
#initialize(gateway, channels) ⇒ Hub
Returns a new instance of Hub.
3 4 5 6 7 8 9 10 |
# File 'lib/pipe_rpc/hub.rb', line 3 def initialize(gateway, channels) @channel = channels[:input] @socket = Socket.new(self, channels) @requests = Requests.new(self) @servers = Servers.new @clients = Clients.new(self) @transport_mapper = TransportMapper.new(gateway) end |
Instance Attribute Details
#channel ⇒ Object (readonly)
Returns the value of attribute channel.
12 13 14 |
# File 'lib/pipe_rpc/hub.rb', line 12 def channel @channel end |
#clients ⇒ Object (readonly)
Returns the value of attribute clients.
12 13 14 |
# File 'lib/pipe_rpc/hub.rb', line 12 def clients @clients end |
#requests ⇒ Object (readonly)
Returns the value of attribute requests.
12 13 14 |
# File 'lib/pipe_rpc/hub.rb', line 12 def requests @requests end |
#servers ⇒ Object (readonly)
Returns the value of attribute servers.
12 13 14 |
# File 'lib/pipe_rpc/hub.rb', line 12 def servers @servers end |
#socket ⇒ Object (readonly)
Returns the value of attribute socket.
12 13 14 |
# File 'lib/pipe_rpc/hub.rb', line 12 def socket @socket end |
#transport_mapper ⇒ Object (readonly)
Returns the value of attribute transport_mapper.
12 13 14 |
# File 'lib/pipe_rpc/hub.rb', line 12 def transport_mapper @transport_mapper end |