Nexus HTTP/3
A QUIC and HTTP/3 library
stream_id.hpp
1 #pragma once
2 
3 #include <cstdint>
4 
5 namespace nexus::quic {
6 
8 using stream_id = uint64_t;
9 
10 
12 inline bool client_initiated(stream_id id)
13 {
14  return (id & 0x1) == 0;
15 }
16 
18 inline bool server_initiated(stream_id id)
19 {
20  return (id & 0x1);
21 }
22 
23 } // namespace nexus::quic
Generic QUIC library.
Definition: client.hpp:8
bool client_initiated(stream_id id)
return true if the stream id was initiated by the client
Definition: stream_id.hpp:12
uint64_t stream_id
stream identifier that is unique to a connection
Definition: stream_id.hpp:8
bool server_initiated(stream_id id)
return true if the stream id was initiated by the server
Definition: stream_id.hpp:18