Sha256: bbbc03b717379d3b1a48a4ff4c12c197974c13fcdc5931cf7e2bf196bc230914

Contents?: true

Size: 789 Bytes

Versions: 4

Compression:

Stored size: 789 Bytes

Contents

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

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
pipe_rpc-2.4.0 lib/pipe_rpc/gateway.rb
pipe_rpc-2.3.0 lib/pipe_rpc/gateway.rb
pipe_rpc-2.2.3 lib/pipe_rpc/gateway.rb
pipe_rpc-2.2.2 lib/pipe_rpc/gateway.rb