class Async::HTTP::Protocol::HTTP2

def initialize(controller, stream)

def initialize(controller, stream)
	@controller = controller
	@stream = stream
	
	@controller.on(:frame) do |data|
		@stream.write(data)
		@stream.flush
	end
	
	@controller.on(:frame_sent) do |frame|
		Async.logger.debug(self) {"Sent frame: #{frame.inspect}"}
	end
	
	@controller.on(:frame_received) do |frame|
		Async.logger.debug(self) {"Received frame: #{frame.inspect}"}
	end
	
	@goaway = false
	
	@controller.on(:goaway) do |payload|
		Async.logger.error(self) {"goaway: #{payload.inspect}"}
		
		@goaway = true
	end
	
	@count = 0
end