Abstraction of a network endpoint (client or server) More...
#include <network.h>
Data Fields | ||
void * | source | |
char * | name | |
Name of this endpoint. | ||
gboolean | is_server | |
Whether this is a client or a server. | ||
int | fd | |
Socket. | ||
uint16_t | port | |
Local port. | ||
imquic_network_address | remote_address | |
Remote address of the peer (clients only) | ||
imquic_tls * | tls | |
TLS stack. | ||
char * | sni | |
SNI the client will use. | ||
gboolean | raw_quic | |
Whether raw QUIC should be supported. | ||
char * | alpn | |
ALPN this endpoint will negotiate, when using raw QUIC. | ||
gboolean | webtransport | |
Whether WebTransport should be supported. | ||
char * | h3_path | |
For WebTransport clients, the path to CONNECT to (/ by default) | ||
char * | subprotocol | |
In case WebTransport is used, subprotocol to negotiate (currently unused) | ||
GHashTable * | connections | |
List of connections handled by this socket (may be more than one for servers) | ||
uint64_t | conns_num | |
Number of connections handled by this socket (may be more than one for servers) | ||
gboolean | internal_callbacks | |
Whether this endpoint has internal generic callbacks (true for the native RoQ and MoQ stacks) | ||
void(* | new_connection )(imquic_connection *conn, void *user_data) | |
Callback to invoke when a new connection is available on this endpoint. | ||
void(* | stream_incoming )(imquic_connection *conn, uint64_t stream_id, uint8_t *bytes, uint64_t offset, uint64_t length, gboolean complete) | |
Callback to invoke when new STREAM data is available on one of the connections handled by this endpoint. | ||
void(* | datagram_incoming )(imquic_connection *conn, uint8_t *bytes, uint64_t length) | |
Callback to invoke when new DATAGRAM data is available on one of the connections handled by this endpoint. | ||
void(* | connection_gone )(imquic_connection *conn) | |
Callback to invoke when new one of the connections handled by this endpoint is closed. | ||
void(* | connection_failed )(void *user_data) | |
Callback to invoke when a client connection attempt fails. | ||
void * | user_data | |
User data to pass in the new_connection callback, to correlate a connection to the endpoint it's coming from. | ||
uint64_t | protocol | |
(Sub-)Protocol this endpoint uses, in case imquic is handling a protocol natively | ||
union { | ||
imquic_moq_callbacks moq | ||
imquic_roq_callbacks roq | ||
} | callbacks | |
(Sub-)Protocol specific callbacks (at the time of writing, RoQ and MoQ only) | ||
imquic_mutex | mutex | |
Mutex. | ||
volatile gint | started | |
Whether this connection has been started. | ||
volatile gint | shutting | |
Whether this connection is being shut down. | ||
volatile gint | destroyed | |
Whether this instance has been destroyed (reference counting) | ||
imquic_refcount | ref | |
Reference counter. | ||
Abstraction of a network endpoint (client or server)
char* imquic_network_endpoint::alpn |
ALPN this endpoint will negotiate, when using raw QUIC.
union { ... } imquic_network_endpoint::callbacks |
(Sub-)Protocol specific callbacks (at the time of writing, RoQ and MoQ only)
void(* imquic_network_endpoint::connection_failed) (void *user_data) |
Callback to invoke when a client connection attempt fails.
void(* imquic_network_endpoint::connection_gone) (imquic_connection *conn) |
Callback to invoke when new one of the connections handled by this endpoint is closed.
GHashTable* imquic_network_endpoint::connections |
List of connections handled by this socket (may be more than one for servers)
uint64_t imquic_network_endpoint::conns_num |
Number of connections handled by this socket (may be more than one for servers)
void(* imquic_network_endpoint::datagram_incoming) (imquic_connection *conn, uint8_t *bytes, uint64_t length) |
Callback to invoke when new DATAGRAM
data is available on one of the connections handled by this endpoint.
volatile gint imquic_network_endpoint::destroyed |
Whether this instance has been destroyed (reference counting)
int imquic_network_endpoint::fd |
Socket.
char* imquic_network_endpoint::h3_path |
For WebTransport clients, the path to CONNECT
to (/
by default)
gboolean imquic_network_endpoint::internal_callbacks |
Whether this endpoint has internal generic callbacks (true for the native RoQ and MoQ stacks)
gboolean imquic_network_endpoint::is_server |
Whether this is a client or a server.
imquic_moq_callbacks imquic_network_endpoint::moq |
imquic_mutex imquic_network_endpoint::mutex |
Mutex.
char* imquic_network_endpoint::name |
Name of this endpoint.
void(* imquic_network_endpoint::new_connection) (imquic_connection *conn, void *user_data) |
Callback to invoke when a new connection is available on this endpoint.
uint16_t imquic_network_endpoint::port |
Local port.
uint64_t imquic_network_endpoint::protocol |
(Sub-)Protocol this endpoint uses, in case imquic is handling a protocol natively
gboolean imquic_network_endpoint::raw_quic |
Whether raw QUIC should be supported.
imquic_refcount imquic_network_endpoint::ref |
Reference counter.
imquic_network_address imquic_network_endpoint::remote_address |
Remote address of the peer (clients only)
imquic_roq_callbacks imquic_network_endpoint::roq |
volatile gint imquic_network_endpoint::shutting |
Whether this connection is being shut down.
char* imquic_network_endpoint::sni |
SNI the client will use.
void* imquic_network_endpoint::source |
brief Opaque pointer to the source owning this socket (to handle it in the loop)
volatile gint imquic_network_endpoint::started |
Whether this connection has been started.
void(* imquic_network_endpoint::stream_incoming) (imquic_connection *conn, uint64_t stream_id, uint8_t *bytes, uint64_t offset, uint64_t length, gboolean complete) |
Callback to invoke when new STREAM
data is available on one of the connections handled by this endpoint.
char* imquic_network_endpoint::subprotocol |
In case WebTransport is used, subprotocol to negotiate (currently unused)
imquic_tls* imquic_network_endpoint::tls |
TLS stack.
void* imquic_network_endpoint::user_data |
User data to pass in the new_connection
callback, to correlate a connection to the endpoint it's coming from.
gboolean imquic_network_endpoint::webtransport |
Whether WebTransport should be supported.