Sha256: 4fc43dc90f7ed63f84d557c63ad50c17c067f601974603179583114b73ce9fc5
Contents?: true
Size: 684 Bytes
Versions: 3
Compression:
Stored size: 684 Bytes
Contents
require "nio" require "tamashii/manager/connection" Thread.abort_on_exception = true module Tamashii module Manager class Stream attr_reader :event_loop def initialize(event_loop, io, client) @client = client @io = io @event_loop = event_loop @event_loop.attach(io, self) end def receive(data) @client.parse(data) end def shutdown clean_rack_hijack end def close shutdown @client.shutdown end private def clean_rack_hijack return unless @io @event_loop.detach(@io, self) @io = nil end end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
tamashii-manager-0.1.7 | lib/tamashii/manager/stream.rb |
tamashii-manager-0.1.5 | lib/tamashii/manager/stream.rb |
tamashii-manager-0.1.4 | lib/tamashii/manager/stream.rb |