LiteSpeed QUIC Library
|
The definition of callback functions call by lsquic_stream to process events. More...
#include <lsquic.h>
Data Fields | |
lsquic_conn_ctx_t *(* | on_new_conn )(void *stream_if_ctx, lsquic_conn_t *c) |
void(* | on_goaway_received )(lsquic_conn_t *c) |
void(* | on_conn_closed )(lsquic_conn_t *c) |
lsquic_stream_ctx_t *(* | on_new_stream )(void *stream_if_ctx, lsquic_stream_t *s) |
void(* | on_read )(lsquic_stream_t *s, lsquic_stream_ctx_t *h) |
void(* | on_write )(lsquic_stream_t *s, lsquic_stream_ctx_t *h) |
void(* | on_close )(lsquic_stream_t *s, lsquic_stream_ctx_t *h) |
The definition of callback functions call by lsquic_stream to process events.
void(* lsquic_stream_if::on_goaway_received) (lsquic_conn_t *c) |
This is called when our side received GOAWAY frame. After this, new streams should not be created. The callback is optional.
lsquic_conn_ctx_t*(* lsquic_stream_if::on_new_conn) (void *stream_if_ctx, lsquic_conn_t *c) |
Use lsquic_conn_get_ctx to get back the context. It is OK for this function to return NULL.
lsquic_stream_ctx_t*(* lsquic_stream_if::on_new_stream) (void *stream_if_ctx, lsquic_stream_t *s) |
If you need to initiate a connection, call lsquic_conn_make_stream(). This will cause `on_new_stream' callback to be called when appropriate (this operation is delayed when maximum number of outgoing streams is reached).
After `on_close' is called, the stream is no longer accessible.