transport/xqc_stream.h
Classes
Name | |
---|---|
struct | xqc_stream_flow_ctl_t |
struct | xqc_stream_frame_s |
struct | xqc_stream_data_in_s |
struct | xqc_stream_write_buff_s |
struct | xqc_stream_write_buff_list_s |
struct | xqc_stream_s |
Types
Name | |
---|---|
enum | xqc_stream_type_t |
enum | xqc_stream_flag_t |
enum | xqc_send_stream_state_t |
enum | xqc_recv_stream_state_t |
typedef struct xqc_stream_frame_s | xqc_stream_frame_t |
typedef struct xqc_stream_data_in_s | xqc_stream_data_in_t |
typedef struct xqc_stream_write_buff_s | xqc_stream_write_buff_t |
typedef struct xqc_stream_write_buff_list_s | xqc_stream_write_buff_list_t |
Functions
Name | |
---|---|
xqc_stream_type_t | xqc_get_stream_type(xqc_stream_id_t stream_id) |
xqc_int_t | xqc_stream_is_bidi(xqc_stream_id_t stream_id) |
xqc_int_t | xqc_stream_is_uni(xqc_stream_id_t stream_id) |
xqc_stream_t * | xqc_create_stream_with_conn(xqc_connection_t * conn, xqc_stream_id_t stream_id, xqc_stream_type_t stream_type, xqc_stream_settings_t * settings, void * user_data) |
void | xqc_stream_record_trans_state(xqc_stream_t * stream, xqc_bool_t begin) |
void | xqc_destroy_stream(xqc_stream_t * stream) |
void | xqc_process_write_streams(xqc_connection_t * conn) |
void | xqc_process_read_streams(xqc_connection_t * conn) |
void | xqc_process_crypto_write_streams(xqc_connection_t * conn) |
void | xqc_process_crypto_read_streams(xqc_connection_t * conn) |
void | xqc_stream_ready_to_write(xqc_stream_t * stream) |
void | xqc_stream_shutdown_write(xqc_stream_t * stream) |
void | xqc_stream_ready_to_read(xqc_stream_t * stream) |
void | xqc_stream_shutdown_read(xqc_stream_t * stream) |
xqc_bool_t | xqc_stream_is_terminal_state(xqc_stream_t * stream) |
void | xqc_stream_maybe_need_close(xqc_stream_t * stream) |
xqc_stream_t * | xqc_find_stream_by_id(xqc_stream_id_t stream_id, xqc_id_hash_table_t * streams_hash) |
void | xqc_stream_set_flow_ctl(xqc_stream_t * stream) |
void | xqc_stream_update_flow_ctl(xqc_stream_t * stream) |
int | xqc_stream_do_send_flow_ctl(xqc_stream_t * stream) |
int | xqc_stream_do_recv_flow_ctl(xqc_stream_t * stream) |
int | xqc_stream_do_create_flow_ctl(xqc_connection_t * conn, xqc_stream_id_t stream_id, xqc_stream_type_t stream_type) |
xqc_stream_t * | xqc_passive_create_stream(xqc_connection_t * conn, xqc_stream_id_t stream_id, void * user_data) |
xqc_stream_t * | xqc_create_crypto_stream(xqc_connection_t * conn, xqc_encrypt_level_t encrypt_level, void * user_data) |
void | xqc_destroy_crypto_stream(xqc_connection_t * conn, xqc_stream_t * stream) |
int | xqc_crypto_stream_on_write(xqc_stream_t * stream, void * user_data) |
int | xqc_read_crypto_stream(xqc_stream_t * stream) |
ssize_t | xqc_stream_buff_data(xqc_stream_t * stream, unsigned char * send_data, size_t send_data_size, uint8_t fin) |
int | xqc_stream_write_buffed_data_to_packets(xqc_stream_t * stream) |
void | xqc_destroy_stream_frame(xqc_stream_frame_t * stream_frame) |
void | xqc_destroy_write_buff(xqc_stream_write_buff_t * write_buff) |
void | xqc_destroy_frame_list(xqc_list_head_t * head) |
void | xqc_destroy_write_buff_list(xqc_list_head_t * head) |
void | xqc_stream_refcnt_add(xqc_stream_t * stream) |
void | xqc_stream_refcnt_del(xqc_stream_t * stream) |
void | xqc_stream_send_state_update(xqc_stream_t * stream, xqc_send_stream_state_t state) |
void | xqc_stream_recv_state_update(xqc_stream_t * stream, xqc_recv_stream_state_t state) |
void | xqc_stream_set_multipath_usage(xqc_stream_t * stream, uint8_t schedule, uint8_t reinject) |
void | xqc_stream_closing(xqc_stream_t * stream, xqc_int_t err) |
void | xqc_stream_close_discarded_stream(xqc_stream_t * stream) |
Defines
Name | |
---|---|
XQC_UNDEFINE_STREAM_ID | |
XQC_STREAM_TRANSPORT_STATE_SZ | |
XQC_STREAM_CLOSE_MSG(stream, msg) |
Types Documentation
enum xqc_stream_type_t
Enumerator | Value | Description |
---|---|---|
XQC_CLI_BID | 0 | |
XQC_SVR_BID | 1 | |
XQC_CLI_UNI | 2 | |
XQC_SVR_UNI | 3 |
enum xqc_stream_flag_t
Enumerator | Value | Description |
---|---|---|
XQC_STREAM_FLAG_READY_TO_WRITE | 1 << 0 | |
XQC_STREAM_FLAG_READY_TO_READ | 1 << 1 | |
XQC_STREAM_FLAG_DATA_BLOCKED | 1 << 2 | |
XQC_STREAM_FLAG_HAS_0RTT | 1 << 3 | |
XQC_STREAM_FLAG_HAS_H3 | 1 << 4 | |
XQC_STREAM_FLAG_NEED_CLOSE | 1 << 5 | |
XQC_STREAM_FLAG_FIN_WRITE | 1 << 6 | |
XQC_STREAM_FLAG_CLOSED | 1 << 7 | |
XQC_STREAM_FLAG_UNEXPECTED | 1 << 8 | |
XQC_STREAM_FLAG_DISCARDED | 1 << 9 |
enum xqc_send_stream_state_t
Enumerator | Value | Description |
---|---|---|
XQC_SEND_STREAM_ST_READY | 0 | |
XQC_SEND_STREAM_ST_SEND | 1 | |
XQC_SEND_STREAM_ST_DATA_SENT | 2 | |
XQC_SEND_STREAM_ST_DATA_RECVD | 3 | |
XQC_SEND_STREAM_ST_RESET_SENT | 4 | |
XQC_SEND_STREAM_ST_RESET_RECVD | 5 |
enum xqc_recv_stream_state_t
Enumerator | Value | Description |
---|---|---|
XQC_RECV_STREAM_ST_RECV | 0 | |
XQC_RECV_STREAM_ST_SIZE_KNOWN | 1 | |
XQC_RECV_STREAM_ST_DATA_RECVD | 2 | |
XQC_RECV_STREAM_ST_DATA_READ | 3 | |
XQC_RECV_STREAM_ST_RESET_RECVD | 4 | |
XQC_RECV_STREAM_ST_RESET_READ | 5 |
typedef xqc_stream_frame_t
cpp
typedef struct xqc_stream_frame_s xqc_stream_frame_t;
typedef xqc_stream_data_in_t
cpp
typedef struct xqc_stream_data_in_s xqc_stream_data_in_t;
typedef xqc_stream_write_buff_t
cpp
typedef struct xqc_stream_write_buff_s xqc_stream_write_buff_t;
typedef xqc_stream_write_buff_list_t
cpp
typedef struct xqc_stream_write_buff_list_s xqc_stream_write_buff_list_t;
Functions Documentation
function xqc_get_stream_type
cpp
static inline xqc_stream_type_t xqc_get_stream_type(
xqc_stream_id_t stream_id
)
function xqc_stream_is_bidi
cpp
static inline xqc_int_t xqc_stream_is_bidi(
xqc_stream_id_t stream_id
)
function xqc_stream_is_uni
cpp
static inline xqc_int_t xqc_stream_is_uni(
xqc_stream_id_t stream_id
)
function xqc_create_stream_with_conn
cpp
xqc_stream_t * xqc_create_stream_with_conn(
xqc_connection_t * conn,
xqc_stream_id_t stream_id,
xqc_stream_type_t stream_type,
xqc_stream_settings_t * settings,
void * user_data
)
function xqc_stream_record_trans_state
cpp
void xqc_stream_record_trans_state(
xqc_stream_t * stream,
xqc_bool_t begin
)
function xqc_destroy_stream
cpp
void xqc_destroy_stream(
xqc_stream_t * stream
)
function xqc_process_write_streams
cpp
void xqc_process_write_streams(
xqc_connection_t * conn
)
function xqc_process_read_streams
cpp
void xqc_process_read_streams(
xqc_connection_t * conn
)
function xqc_process_crypto_write_streams
cpp
void xqc_process_crypto_write_streams(
xqc_connection_t * conn
)
function xqc_process_crypto_read_streams
cpp
void xqc_process_crypto_read_streams(
xqc_connection_t * conn
)
function xqc_stream_ready_to_write
cpp
void xqc_stream_ready_to_write(
xqc_stream_t * stream
)
function xqc_stream_shutdown_write
cpp
void xqc_stream_shutdown_write(
xqc_stream_t * stream
)
function xqc_stream_ready_to_read
cpp
void xqc_stream_ready_to_read(
xqc_stream_t * stream
)
function xqc_stream_shutdown_read
cpp
void xqc_stream_shutdown_read(
xqc_stream_t * stream
)
function xqc_stream_is_terminal_state
cpp
xqc_bool_t xqc_stream_is_terminal_state(
xqc_stream_t * stream
)
function xqc_stream_maybe_need_close
cpp
void xqc_stream_maybe_need_close(
xqc_stream_t * stream
)
function xqc_find_stream_by_id
cpp
xqc_stream_t * xqc_find_stream_by_id(
xqc_stream_id_t stream_id,
xqc_id_hash_table_t * streams_hash
)
function xqc_stream_set_flow_ctl
cpp
void xqc_stream_set_flow_ctl(
xqc_stream_t * stream
)
function xqc_stream_update_flow_ctl
cpp
void xqc_stream_update_flow_ctl(
xqc_stream_t * stream
)
function xqc_stream_do_send_flow_ctl
cpp
int xqc_stream_do_send_flow_ctl(
xqc_stream_t * stream
)
function xqc_stream_do_recv_flow_ctl
cpp
int xqc_stream_do_recv_flow_ctl(
xqc_stream_t * stream
)
function xqc_stream_do_create_flow_ctl
cpp
int xqc_stream_do_create_flow_ctl(
xqc_connection_t * conn,
xqc_stream_id_t stream_id,
xqc_stream_type_t stream_type
)
function xqc_passive_create_stream
cpp
xqc_stream_t * xqc_passive_create_stream(
xqc_connection_t * conn,
xqc_stream_id_t stream_id,
void * user_data
)
function xqc_create_crypto_stream
cpp
xqc_stream_t * xqc_create_crypto_stream(
xqc_connection_t * conn,
xqc_encrypt_level_t encrypt_level,
void * user_data
)
function xqc_destroy_crypto_stream
cpp
void xqc_destroy_crypto_stream(
xqc_connection_t * conn,
xqc_stream_t * stream
)
function xqc_crypto_stream_on_write
cpp
int xqc_crypto_stream_on_write(
xqc_stream_t * stream,
void * user_data
)
function xqc_read_crypto_stream
cpp
int xqc_read_crypto_stream(
xqc_stream_t * stream
)
function xqc_stream_buff_data
cpp
ssize_t xqc_stream_buff_data(
xqc_stream_t * stream,
unsigned char * send_data,
size_t send_data_size,
uint8_t fin
)
function xqc_stream_write_buffed_data_to_packets
cpp
int xqc_stream_write_buffed_data_to_packets(
xqc_stream_t * stream
)
function xqc_destroy_stream_frame
cpp
void xqc_destroy_stream_frame(
xqc_stream_frame_t * stream_frame
)
function xqc_destroy_write_buff
cpp
void xqc_destroy_write_buff(
xqc_stream_write_buff_t * write_buff
)
function xqc_destroy_frame_list
cpp
void xqc_destroy_frame_list(
xqc_list_head_t * head
)
function xqc_destroy_write_buff_list
cpp
void xqc_destroy_write_buff_list(
xqc_list_head_t * head
)
function xqc_stream_refcnt_add
cpp
void xqc_stream_refcnt_add(
xqc_stream_t * stream
)
function xqc_stream_refcnt_del
cpp
void xqc_stream_refcnt_del(
xqc_stream_t * stream
)
function xqc_stream_send_state_update
cpp
void xqc_stream_send_state_update(
xqc_stream_t * stream,
xqc_send_stream_state_t state
)
function xqc_stream_recv_state_update
cpp
void xqc_stream_recv_state_update(
xqc_stream_t * stream,
xqc_recv_stream_state_t state
)
function xqc_stream_set_multipath_usage
cpp
void xqc_stream_set_multipath_usage(
xqc_stream_t * stream,
uint8_t schedule,
uint8_t reinject
)
function xqc_stream_closing
cpp
void xqc_stream_closing(
xqc_stream_t * stream,
xqc_int_t err
)
function xqc_stream_close_discarded_stream
cpp
void xqc_stream_close_discarded_stream(
xqc_stream_t * stream
)
Macros Documentation
define XQC_UNDEFINE_STREAM_ID
cpp
#define XQC_UNDEFINE_STREAM_ID XQC_MAX_UINT64_VALUE
Copyright: Copyright (c) 2022, Alibaba Group Holding Limited
define XQC_STREAM_TRANSPORT_STATE_SZ
cpp
#define XQC_STREAM_TRANSPORT_STATE_SZ 128
define XQC_STREAM_CLOSE_MSG
cpp
#define XQC_STREAM_CLOSE_MSG(
stream,
msg
)
do { \
if ((stream)->stream_close_msg == NULL) { \
(stream)->stream_close_msg = (msg); \
} \
} while(0) \
Updated on 2024-11-19 at 20:49:45 +0800