Sha256: b887b3ba2ed9215151b58bc61e65c9cfcae8d05310907b9846a36e00b70f6360

Contents?: true

Size: 555 Bytes

Versions: 15

Compression:

Stored size: 555 Bytes

Contents

module Envoy
  module Server
    
    class Channel
      
      attr_accessor :trunk, :web
      
      def initialize trunk, web, header
        @trunk = trunk
        @web = web
        @trunk.channels[id] = self
        @trunk.send_object :connection, id
        stream header
      end
      
      def stream data
        @trunk.send_object :stream, id, data
      end
      
      def message data
        @trunk.send_object :message, data
      end
      
      def id
        @id ||= SecureRandom.hex(4)
      end
      
    end
    
  end
end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
envoy-proxy-1.0.3 lib/envoy/server/channel.rb
envoy-proxy-1.0.1 lib/envoy/server/channel.rb
envoy-proxy-1.0.0 lib/envoy/server/channel.rb
envoy-proxy-0.2.3 lib/envoy/server/channel.rb
envoy-proxy-0.2.2 lib/envoy/server/channel.rb
envoy-proxy-0.2.0 lib/envoy/server/channel.rb
envoy-proxy-0.1.5 lib/envoy/server/channel.rb
envoy-proxy-0.1.4 lib/envoy/server/channel.rb
envoy-proxy-0.1.3 lib/envoy/server/channel.rb
envoy-proxy-0.1.2 lib/envoy/server/channel.rb
envoy-proxy-0.1.1 lib/envoy/server/channel.rb
envoy-proxy-0.1.0 lib/envoy/server/channel.rb
envoy-proxy-0.0.19 lib/envoy/server/channel.rb
envoy-proxy-0.0.18 lib/envoy/server/channel.rb
envoy-proxy-0.0.17 lib/envoy/server/channel.rb