Method: Protocol::HTTP2::Connection#receive_data

Defined in:
lib/protocol/http2/connection.rb

#receive_data(frame) ⇒ Object



241
242
243
244
245
246
247
248
249
250
251
252
253
# File 'lib/protocol/http2/connection.rb', line 241

def receive_data(frame)
	consume_local_window(frame)
	
	if stream = @streams[frame.stream_id]
		stream.receive_data(frame)
		
		if stream.closed?
			@streams.delete(stream.id)
		end
	else
		raise ProtocolError, "Bad stream"
	end
end