Loading...
Searching...
No Matches
Data Fields
imquic_network_endpoint Struct Reference

Abstraction of a network endpoint (client or server) More...

#include <network.h>

Collaboration diagram for imquic_network_endpoint:
Collaboration graph
[legend]

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_tlstls
 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.
 

Detailed Description

Abstraction of a network endpoint (client or server)

Field Documentation

◆ alpn

char* imquic_network_endpoint::alpn

ALPN this endpoint will negotiate, when using raw QUIC.

◆ [union]

union { ... } imquic_network_endpoint::callbacks

(Sub-)Protocol specific callbacks (at the time of writing, RoQ and MoQ only)

◆ connection_failed

void(* imquic_network_endpoint::connection_failed) (void *user_data)

Callback to invoke when a client connection attempt fails.

◆ connection_gone

void(* imquic_network_endpoint::connection_gone) (imquic_connection *conn)

Callback to invoke when new one of the connections handled by this endpoint is closed.

◆ connections

GHashTable* imquic_network_endpoint::connections

List of connections handled by this socket (may be more than one for servers)

◆ conns_num

uint64_t imquic_network_endpoint::conns_num

Number of connections handled by this socket (may be more than one for servers)

◆ datagram_incoming

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.

◆ destroyed

volatile gint imquic_network_endpoint::destroyed

Whether this instance has been destroyed (reference counting)

◆ fd

int imquic_network_endpoint::fd

Socket.

◆ h3_path

char* imquic_network_endpoint::h3_path

For WebTransport clients, the path to CONNECT to (/ by default)

◆ internal_callbacks

gboolean imquic_network_endpoint::internal_callbacks

Whether this endpoint has internal generic callbacks (true for the native RoQ and MoQ stacks)

◆ is_server

gboolean imquic_network_endpoint::is_server

Whether this is a client or a server.

◆ moq

imquic_moq_callbacks imquic_network_endpoint::moq

◆ mutex

imquic_mutex imquic_network_endpoint::mutex

Mutex.

◆ name

char* imquic_network_endpoint::name

Name of this endpoint.

◆ new_connection

void(* imquic_network_endpoint::new_connection) (imquic_connection *conn, void *user_data)

Callback to invoke when a new connection is available on this endpoint.

◆ port

uint16_t imquic_network_endpoint::port

Local port.

◆ protocol

uint64_t imquic_network_endpoint::protocol

(Sub-)Protocol this endpoint uses, in case imquic is handling a protocol natively

◆ raw_quic

gboolean imquic_network_endpoint::raw_quic

Whether raw QUIC should be supported.

◆ ref

imquic_refcount imquic_network_endpoint::ref

Reference counter.

◆ remote_address

imquic_network_address imquic_network_endpoint::remote_address

Remote address of the peer (clients only)

◆ roq

imquic_roq_callbacks imquic_network_endpoint::roq

◆ shutting

volatile gint imquic_network_endpoint::shutting

Whether this connection is being shut down.

◆ sni

char* imquic_network_endpoint::sni

SNI the client will use.

◆ source

void* imquic_network_endpoint::source

brief Opaque pointer to the source owning this socket (to handle it in the loop)

◆ started

volatile gint imquic_network_endpoint::started

Whether this connection has been started.

◆ stream_incoming

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.

◆ subprotocol

char* imquic_network_endpoint::subprotocol

In case WebTransport is used, subprotocol to negotiate (currently unused)

◆ tls

imquic_tls* imquic_network_endpoint::tls

TLS stack.

◆ user_data

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.

◆ webtransport

gboolean imquic_network_endpoint::webtransport

Whether WebTransport should be supported.


The documentation for this struct was generated from the following file: