module PipeRpc class Gateway def initialize(args) @hub = Hub.new(args) end def channel @hub.channel end def servers @hub.servers end def clients @hub.clients end def loop_iteration=(iteration) @hub.requests.wait_for_results_through(iteration) end def on_sent(&on_sent) @hub.socket.on_sent(&on_sent) end def off_sent(on_sent) @hub.socket.off_sent(on_sent) end def on_received(&on_received) @hub.socket.on_received(&on_received) end def off_received(on_received) @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