Sha256: 632371ae5b576509b3d98927fff885339bcd6478c68247188a70f415765e544a

Contents?: true

Size: 629 Bytes

Versions: 9

Compression:

Stored size: 629 Bytes

Contents

module Envoy
  module Client
    
    module Channel
      
      def initialize id, client
        @id, @client = id, client
        super()
      end
      
      def receive_data data
        @client.send_object :stream, @id, data
      end
      
      def unbind
        @client.send_object :close, @id
      end
      
    end
    
    def self.run (options = {})
      unless EM.reactor_running?
        EM.run do
          EM.add_periodic_timer(0.1) do
            $reloader.(0)
          end
          EM.connect options[:server_host], options[:server_port], self, options
        end
      end
    end
    
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
envoy-proxy-0.0.10 lib/envoy/client/channel.rb
envoy-proxy-0.0.9 lib/envoy/client/channel.rb
envoy-proxy-0.0.8 lib/envoy/client/channel.rb
envoy-proxy-0.0.7 lib/envoy/client/channel.rb
envoy-proxy-0.0.6 lib/envoy/client/channel.rb
envoy-proxy-0.0.5 lib/envoy/client/channel.rb
envoy-proxy-0.0.4 lib/envoy/client/channel.rb
envoy-proxy-0.0.2 lib/envoy/client/channel.rb
envoy-proxy-0.0.1 lib/envoy/client/channel.rb