Skip to content

http3/xqc_h3_conn.h

Classes

Name
structxqc_h3_conn_s

Types

Name
enumxqc_http3_conn_flag
typedef struct xqc_h3_conn_sxqc_h3_conn_t

Functions

Name
xqc_h3_conn_t *xqc_h3_conn_create(xqc_connection_t * conn, void * user_data)
create and destroy an http3 connection
voidxqc_h3_conn_destroy(xqc_h3_conn_t * h3c)
xqc_int_txqc_h3_conn_on_uni_stream_created(xqc_h3_conn_t * h3c, uint64_t stype)
xqc_bool_txqc_h3_conn_is_goaway_recved(xqc_h3_conn_t * h3c, uint64_t stream_id)
xqc_int_txqc_h3_conn_on_settings_entry_received(uint64_t identifier, uint64_t value, void * user_data)
xqc_qpack_t *xqc_h3_conn_get_qpack(xqc_h3_conn_t * h3c)
xqc_h3_blocked_stream_t *xqc_h3_conn_add_blocked_stream(xqc_h3_conn_t * h3c, xqc_h3_stream_t * h3s, uint64_t ric)
voidxqc_h3_conn_remove_blocked_stream(xqc_h3_conn_t * h3c, xqc_h3_blocked_stream_t * blocked_stream)
xqc_int_txqc_h3_conn_process_blocked_stream(xqc_h3_conn_t * h3c)
xqc_var_buf_t *xqc_h3_conn_get_ins_buf(xqc_qpack_ins_type_t type, void * user_data)
ssize_txqc_h3_conn_send_ins(xqc_qpack_ins_type_t type, xqc_var_buf_t * buf, void * user_data)

Attributes

Name
xqc_h3_conn_settings_tdefault_h3_conn_settings
const xqc_conn_callbacks_th3_conn_callbacks

Defines

Name
XQC_H3_SETTINGS_UNSET
XQC_H3_CONN_ERR(h3_conn, err, ret)

Types Documentation

enum xqc_http3_conn_flag

EnumeratorValueDescription
XQC_H3_CONN_FLAG_SETTINGS_RECVED1 << 0
XQC_H3_CONN_FLAG_CONTROL_OPENED1 << 1
XQC_H3_CONN_FLAG_PUSH_OPENED1 << 2
XQC_H3_CONN_FLAG_QPACK_ENCODER_OPENED1 << 3
XQC_H3_CONN_FLAG_QPACK_DECODER_OPENED1 << 4
XQC_H3_CONN_FLAG_GOAWAY_SEND1 << 5
XQC_H3_CONN_FLAG_GOAWAY_RECVD1 << 6
XQC_H3_CONN_FLAG_UPPER_CONN_EXIST1 << 7
XQC_H3_CONN_FLAG_EXT_ENABLED1 << 8

typedef xqc_h3_conn_t

cpp
typedef struct xqc_h3_conn_s xqc_h3_conn_t;

Functions Documentation

function xqc_h3_conn_create

cpp
xqc_h3_conn_t * xqc_h3_conn_create(
    xqc_connection_t * conn,
    void * user_data
)

create and destroy an http3 connection

function xqc_h3_conn_destroy

cpp
void xqc_h3_conn_destroy(
    xqc_h3_conn_t * h3c
)

function xqc_h3_conn_on_uni_stream_created

cpp
xqc_int_t xqc_h3_conn_on_uni_stream_created(
    xqc_h3_conn_t * h3c,
    uint64_t stype
)

validate the uni stream creation event

function xqc_h3_conn_is_goaway_recved

cpp
xqc_bool_t xqc_h3_conn_is_goaway_recved(
    xqc_h3_conn_t * h3c,
    uint64_t stream_id
)

whether goaway is recved

function xqc_h3_conn_on_settings_entry_received

cpp
xqc_int_t xqc_h3_conn_on_settings_entry_received(
    uint64_t identifier,
    uint64_t value,
    void * user_data
)

function xqc_h3_conn_get_qpack

cpp
xqc_qpack_t * xqc_h3_conn_get_qpack(
    xqc_h3_conn_t * h3c
)

get qpack instance this is used to encode or decode http headers in xqc_h3_stream_t

function xqc_h3_conn_add_blocked_stream

cpp
xqc_h3_blocked_stream_t * xqc_h3_conn_add_blocked_stream(
    xqc_h3_conn_t * h3c,
    xqc_h3_stream_t * h3s,
    uint64_t ric
)

function xqc_h3_conn_remove_blocked_stream

cpp
void xqc_h3_conn_remove_blocked_stream(
    xqc_h3_conn_t * h3c,
    xqc_h3_blocked_stream_t * blocked_stream
)

function xqc_h3_conn_process_blocked_stream

cpp
xqc_int_t xqc_h3_conn_process_blocked_stream(
    xqc_h3_conn_t * h3c
)

function xqc_h3_conn_get_ins_buf

cpp
xqc_var_buf_t * xqc_h3_conn_get_ins_buf(
    xqc_qpack_ins_type_t type,
    void * user_data
)

function xqc_h3_conn_send_ins

cpp
ssize_t xqc_h3_conn_send_ins(
    xqc_qpack_ins_type_t type,
    xqc_var_buf_t * buf,
    void * user_data
)

Attributes Documentation

variable default_h3_conn_settings

cpp
xqc_h3_conn_settings_t default_h3_conn_settings;

variable h3_conn_callbacks

cpp
const xqc_conn_callbacks_t h3_conn_callbacks;

Macros Documentation

define XQC_H3_SETTINGS_UNSET

cpp
#define XQC_H3_SETTINGS_UNSET XQC_MAX_UINT64_VALUE

Copyright: Copyright (c) 2022, Alibaba Group Holding Limited

define XQC_H3_CONN_ERR

cpp
#define XQC_H3_CONN_ERR(
    h3_conn,
    err,
    ret
)
    do {                     \
    if (h3_conn->conn->conn_err == 0 && ret <= -XQC_H3_EMALLOC) {   \
        h3_conn->conn->conn_err = err;                              \
        h3_conn->conn->conn_flag |= XQC_CONN_FLAG_ERROR;            \
        xqc_log(h3_conn->conn->log, XQC_LOG_ERROR, "|conn:%p|err:0x%xi|ret:%i|%s|", \
                h3_conn->conn, h3_conn->conn->conn_err, (int64_t)ret,   \
                xqc_conn_addr_str(h3_conn->conn));                  \
    }                                                               \
} while(0)                                                          \

Updated on 2024-11-19 at 20:49:45 +0800