Skip to content

transport/xqc_stream.h

Classes

Name
structxqc_stream_flow_ctl_t
structxqc_stream_frame_s
structxqc_stream_data_in_s
structxqc_stream_write_buff_s
structxqc_stream_write_buff_list_s
structxqc_stream_s

Types

Name
enumxqc_stream_type_t
enumxqc_stream_flag_t
enumxqc_send_stream_state_t
enumxqc_recv_stream_state_t
typedef struct xqc_stream_frame_sxqc_stream_frame_t
typedef struct xqc_stream_data_in_sxqc_stream_data_in_t
typedef struct xqc_stream_write_buff_sxqc_stream_write_buff_t
typedef struct xqc_stream_write_buff_list_sxqc_stream_write_buff_list_t

Functions

Name
xqc_stream_type_txqc_get_stream_type(xqc_stream_id_t stream_id)
xqc_int_txqc_stream_is_bidi(xqc_stream_id_t stream_id)
xqc_int_txqc_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)
voidxqc_stream_record_trans_state(xqc_stream_t * stream, xqc_bool_t begin)
voidxqc_destroy_stream(xqc_stream_t * stream)
voidxqc_process_write_streams(xqc_connection_t * conn)
voidxqc_process_read_streams(xqc_connection_t * conn)
voidxqc_process_crypto_write_streams(xqc_connection_t * conn)
voidxqc_process_crypto_read_streams(xqc_connection_t * conn)
voidxqc_stream_ready_to_write(xqc_stream_t * stream)
voidxqc_stream_shutdown_write(xqc_stream_t * stream)
voidxqc_stream_ready_to_read(xqc_stream_t * stream)
voidxqc_stream_shutdown_read(xqc_stream_t * stream)
xqc_bool_txqc_stream_is_terminal_state(xqc_stream_t * stream)
voidxqc_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)
voidxqc_stream_set_flow_ctl(xqc_stream_t * stream)
voidxqc_stream_update_flow_ctl(xqc_stream_t * stream)
intxqc_stream_do_send_flow_ctl(xqc_stream_t * stream)
intxqc_stream_do_recv_flow_ctl(xqc_stream_t * stream)
intxqc_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)
voidxqc_destroy_crypto_stream(xqc_connection_t * conn, xqc_stream_t * stream)
intxqc_crypto_stream_on_write(xqc_stream_t * stream, void * user_data)
intxqc_read_crypto_stream(xqc_stream_t * stream)
ssize_txqc_stream_buff_data(xqc_stream_t * stream, unsigned char * send_data, size_t send_data_size, uint8_t fin)
intxqc_stream_write_buffed_data_to_packets(xqc_stream_t * stream)
voidxqc_destroy_stream_frame(xqc_stream_frame_t * stream_frame)
voidxqc_destroy_write_buff(xqc_stream_write_buff_t * write_buff)
voidxqc_destroy_frame_list(xqc_list_head_t * head)
voidxqc_destroy_write_buff_list(xqc_list_head_t * head)
voidxqc_stream_refcnt_add(xqc_stream_t * stream)
voidxqc_stream_refcnt_del(xqc_stream_t * stream)
voidxqc_stream_send_state_update(xqc_stream_t * stream, xqc_send_stream_state_t state)
voidxqc_stream_recv_state_update(xqc_stream_t * stream, xqc_recv_stream_state_t state)
voidxqc_stream_set_multipath_usage(xqc_stream_t * stream, uint8_t schedule, uint8_t reinject)
voidxqc_stream_closing(xqc_stream_t * stream, xqc_int_t err)
voidxqc_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

EnumeratorValueDescription
XQC_CLI_BID0
XQC_SVR_BID1
XQC_CLI_UNI2
XQC_SVR_UNI3

enum xqc_stream_flag_t

EnumeratorValueDescription
XQC_STREAM_FLAG_READY_TO_WRITE1 << 0
XQC_STREAM_FLAG_READY_TO_READ1 << 1
XQC_STREAM_FLAG_DATA_BLOCKED1 << 2
XQC_STREAM_FLAG_HAS_0RTT1 << 3
XQC_STREAM_FLAG_HAS_H31 << 4
XQC_STREAM_FLAG_NEED_CLOSE1 << 5
XQC_STREAM_FLAG_FIN_WRITE1 << 6
XQC_STREAM_FLAG_CLOSED1 << 7
XQC_STREAM_FLAG_UNEXPECTED1 << 8
XQC_STREAM_FLAG_DISCARDED1 << 9

enum xqc_send_stream_state_t

EnumeratorValueDescription
XQC_SEND_STREAM_ST_READY0
XQC_SEND_STREAM_ST_SEND1
XQC_SEND_STREAM_ST_DATA_SENT2
XQC_SEND_STREAM_ST_DATA_RECVD3
XQC_SEND_STREAM_ST_RESET_SENT4
XQC_SEND_STREAM_ST_RESET_RECVD5

enum xqc_recv_stream_state_t

EnumeratorValueDescription
XQC_RECV_STREAM_ST_RECV0
XQC_RECV_STREAM_ST_SIZE_KNOWN1
XQC_RECV_STREAM_ST_DATA_RECVD2
XQC_RECV_STREAM_ST_DATA_READ3
XQC_RECV_STREAM_ST_RESET_RECVD4
XQC_RECV_STREAM_ST_RESET_READ5

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