Method: HTTP::Protocol::HTTP2::Connection#next_stream_id
- Defined in:
- lib/http/protocol/http2/connection.rb
#next_stream_id ⇒ Object
Streams are identified with an unsigned 31-bit integer. Streams initiated by a client MUST use odd-numbered stream identifiers; those initiated by the server MUST use even-numbered stream identifiers. A stream identifier of zero (0x0) is used for connection control messages; the stream identifier of zero cannot be used to establish a new stream.
101 102 103 104 105 106 107 |
# File 'lib/http/protocol/http2/connection.rb', line 101 def next_stream_id id = @local_stream_id @local_stream_id += 2 return id end |