class Protocol::HTTP2::Server
def read_connection_preface(settings = [])
def read_connection_preface(settings = []) if @state == :new @framer.read_connection_preface send_settings(settings) read_frame do |frame| unless frame.is_a? SettingsFrame raise ProtocolError, "First frame must be #{SettingsFrame}, but got #{frame.class}" end end else raise ProtocolError, "Cannot read connection preface in state #{@state}" end end