Alien-nghttp3
view release on metacpan or search on metacpan
vendor/nghttp3-1.18.0/lib/nghttp3_conn.h view on Meta::CPAN
/* NGHTTP3_QPACK_ENCODER_MAX_BLOCK_STREAMS is the maximum number of
blocked streams for QPACK encoder. */
#define NGHTTP3_QPACK_ENCODER_MAX_BLOCK_STREAMS 100
/* NGHTTP3_CONN_FLAG_NONE indicates that no flag is set. */
#define NGHTTP3_CONN_FLAG_NONE 0x0000U
/* NGHTTP3_CONN_FLAG_SETTINGS_RECVED is set when SETTINGS frame has
been received. */
#define NGHTTP3_CONN_FLAG_SETTINGS_RECVED 0x0001U
/* NGHTTP3_CONN_FLAG_CONTROL_OPENED is set when a control stream has
opened. */
#define NGHTTP3_CONN_FLAG_CONTROL_OPENED 0x0002U
/* NGHTTP3_CONN_FLAG_QPACK_ENCODER_OPENED is set when a QPACK encoder
stream has opened. */
#define NGHTTP3_CONN_FLAG_QPACK_ENCODER_OPENED 0x0004U
/* NGHTTP3_CONN_FLAG_QPACK_DECODER_OPENED is set when a QPACK decoder
stream has opened. */
#define NGHTTP3_CONN_FLAG_QPACK_DECODER_OPENED 0x0008U
/* NGHTTP3_CONN_FLAG_SHUTDOWN_COMMENCED is set when graceful shutdown
has started. */
#define NGHTTP3_CONN_FLAG_SHUTDOWN_COMMENCED 0x0010U
/* NGHTTP3_CONN_FLAG_GOAWAY_RECVED indicates that GOAWAY frame has
received. */
#define NGHTTP3_CONN_FLAG_GOAWAY_RECVED 0x0020U
/* NGHTTP3_CONN_FLAG_GOAWAY_QUEUED indicates that GOAWAY frame has
been submitted for transmission. */
#define NGHTTP3_CONN_FLAG_GOAWAY_QUEUED 0x0040U
typedef struct nghttp3_chunk {
nghttp3_opl_entry oplent;
} nghttp3_chunk;
nghttp3_objalloc_decl(chunk, nghttp3_chunk, oplent)
struct nghttp3_conn {
nghttp3_objalloc out_chunk_objalloc;
nghttp3_objalloc stream_objalloc;
nghttp3_callbacks callbacks;
nghttp3_map streams;
nghttp3_qpack_decoder qdec;
nghttp3_qpack_encoder qenc;
nghttp3_pq qpack_blocked_streams;
nghttp3_ratelim glitch_rlim;
struct {
nghttp3_pq spq;
} sched[NGHTTP3_URGENCY_LEVELS];
const nghttp3_mem *mem;
void *user_data;
int server;
uint16_t flags;
struct {
/* origin_list contains the shallow copy of
nghttp3_settings.origin_list passed from an application if this
object is initialized as server. settings.origin_list may
point to the address of this field. */
nghttp3_vec origin_list;
nghttp3_settings settings;
struct {
/* max_pushes is the number of push IDs that local endpoint can
issue. This field is used by server only and used just for
validation */
uint64_t max_pushes;
} uni;
} local;
struct {
struct {
nghttp3_idtr idtr;
/* max_client_streams is the cumulative number of client
initiated bidirectional stream ID the remote endpoint can
issue. This field is used on server side only. */
uint64_t max_client_streams;
/* num_streams is the number of client initiated bidirectional
streams that are currently open. This field is for server
use only. */
size_t num_streams;
} bidi;
nghttp3_proto_settings settings;
} remote;
struct {
/* goaway_id is the latest ID received in GOAWAY frame. */
int64_t goaway_id;
int64_t max_stream_id_bidi;
union {
struct {
/* pri_fieldbuf is a buffer to store incoming Priority Field Value
in PRIORITY_UPDATE frame. */
uint8_t pri_fieldbuf[8];
/* pri_fieldlen is the number of bytes written into
pri_fieldbuf. */
size_t pri_fieldbuflen;
};
/* ORIGIN frame */
struct {
/* originlen_offset is the offset to Origin-Len that is going
to be added to originlen. If this value equals
sizeof(originlen), Origin-Len is fully read, and the length
of ASCII-Origin is determined. */
size_t originlen_offset;
/* originlen is Origin-Len of ASCII-Origin currently read. */
uint16_t originlen;
};
};
/* originbuf points to the buffer that contains ASCII-Origin that
is not fully available in a single input buffer. If it is
fully available in the input buffer, it is emitted to an
application without using this field. Otherwise, partial
ASCII-Origin is copied to this field, and the complete
ASCII-Origin is emitted when the assembly finishes. */
uint8_t *originbuf;
/* originbuflen is the length of bytes written to originbuf. */
size_t originbuflen;
} rx;
struct {
struct {
nghttp3_buf rbuf;
nghttp3_buf ebuf;
} qpack;
nghttp3_stream *ctrl;
nghttp3_stream *qenc;
nghttp3_stream *qdec;
/* goaway_id is the latest ID sent in GOAWAY frame. */
int64_t goaway_id;
} tx;
};
( run in 0.728 second using v1.01-cache-2.11-cpan-99fa8243a42 )