lib/http/protocol/http2/framer.rb in http-protocol-0.3.1 vs lib/http/protocol/http2/framer.rb in http-protocol-0.3.2

- old
+ new

@@ -76,28 +76,29 @@ end return string end - def read_frame + def read_frame(maximum_frame_size = MAXIMUM_ALLOWED_FRAME_SIZE) # Read the header: length, type, flags, stream_id = read_header # puts "framer: read_frame #{type} #{length}" # Allocate the frame: klass = @frames[type] || Frame frame = klass.new(stream_id, flags, type, length) # Read the payload: - frame.read(@io) + frame.read(@io, maximum_frame_size) return frame end def write_frame(frame) # puts "framer: write_frame #{frame.inspect}" frame.write(@io) + @io.flush end def read_header if buffer = @io.read(9)