class Envoy::Server::Channel
Attributes
trunk[RW]
web[RW]
Public Class Methods
new(trunk, web, header)
click to toggle source
# File lib/envoy/server/channel.rb, line 9 def initialize trunk, web, header @trunk = trunk @web = web @trunk.channels[id] = self @trunk.send_object :connection, id stream header end
Public Instance Methods
id()
click to toggle source
# File lib/envoy/server/channel.rb, line 25 def id @id ||= SecureRandom.hex(4) end
message(data)
click to toggle source
# File lib/envoy/server/channel.rb, line 21 def message data @trunk.send_object :message, data end
stream(data)
click to toggle source
# File lib/envoy/server/channel.rb, line 17 def stream data @trunk.send_object :stream, id, data end