Method: Protocol::HTTP2::Connection#receive_settings

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

#receive_settings(frame) ⇒ Object



297
298
299
300
301
302
303
304
305
306
# File 'lib/protocol/http2/connection.rb', line 297

def receive_settings(frame)
  if @state == :new
    # We transition to :open when we receive acknowledgement of first settings frame:
    open! if process_settings(frame)
  elsif @state != :closed
    process_settings(frame)
  else
    raise ProtocolError, "Cannot receive settings in state #{@state}"
  end
end