Method: Protocol::HTTP2::Connection#accept_stream

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

#accept_stream(stream_id, &block) ⇒ Object

Accept an incoming stream from the other side of the connnection. On the server side, we accept requests.



340
341
342
343
344
345
346
# File 'lib/protocol/http2/connection.rb', line 340

def accept_stream(stream_id, &block)
  unless valid_remote_stream_id?(stream_id)
    raise ProtocolError, "Invalid stream id: #{stream_id}"
  end
  
  create_stream(stream_id, &block)
end