lib/pipe_rpc/gateway.rb in pipe_rpc-2.4.0 vs lib/pipe_rpc/gateway.rb in pipe_rpc-2.5.0

- old
+ new

@@ -1,11 +1,15 @@ module PipeRpc class Gateway - def initialize(args) - @hub = Hub.new(args) + def initialize(channels) + @hub = Hub.new(self, channels) + @client_wrapper_class_namespace = ClientWrappers + @subject_server_class_namespace = SubjectServers end + attr_accessor :client_wrapper_class_namespace, :subject_server_class_namespace + def channel @hub.channel end def servers @@ -18,10 +22,14 @@ def loop_iteration=(iteration) @hub.requests.wait_for_results_through(iteration) end + def handle_message + @hub.handle_message + end + def on_sent(&on_sent) @hub.socket.on_sent(&on_sent) end def off_sent(on_sent) @@ -36,12 +44,8 @@ @hub.socket.off_received(on_received) end def close(reason = 'manually closed') @hub.socket.close(reason) - end - - def handle_message - @hub.handle_message end end end \ No newline at end of file