Loading...
Searching...
No Matches
internal/roq.h
Go to the documentation of this file.
1
18#ifndef IMQUIC_ROQ_INTERNAL_H
19#define IMQUIC_ROQ_INTERNAL_H
20
21#include <glib.h>
22
23#include "../imquic/imquic.h"
24#include "mutex.h"
25#include "refcount.h"
26
27#define IMQUIC_ROQ 7499633
28
30void imquic_roq_init(void);
32void imquic_roq_deinit(void);
33
45
47typedef struct imquic_roq_stream {
49 uint64_t stream_id;
51 uint64_t flow_id;
53 uint64_t offset;
55 volatile gint destroyed;
59
61typedef struct imquic_roq_callbacks {
63 void (* new_connection)(imquic_connection *conn, void *user_data);
65 void (* rtp_incoming)(imquic_connection *conn, uint64_t flow_id, uint8_t *bytes, size_t blen);
69
73
77void imquic_roq_new_connection(imquic_connection *conn, void *user_data);
85void imquic_roq_stream_incoming(imquic_connection *conn, uint64_t stream_id,
86 uint8_t *bytes, uint64_t offset, uint64_t length, gboolean complete);
91void imquic_roq_datagram_incoming(imquic_connection *conn, uint8_t *bytes, uint64_t length);
96
97#endif
imquic public interface (headers)
void imquic_roq_datagram_incoming(imquic_connection *conn, uint8_t *bytes, uint64_t length)
Callback the core invokes when there's new incoming data on a DATAGRAM.
Definition roq.c:190
struct imquic_roq_callbacks imquic_roq_callbacks
RoQ public callbacks.
void imquic_roq_init(void)
Initialize the native RoQ stack at startup.
Definition roq.c:50
struct imquic_roq_stream imquic_roq_stream
RoQ stream (when using the same stream for multiple packets)
void imquic_roq_deinit(void)
Uninitialize the native RoQ stack.
Definition roq.c:54
struct imquic_roq_endpoint imquic_roq_endpoint
RoQ endpoint instance.
void imquic_roq_connection_gone(imquic_connection *conn)
Callback the core invokes when an existing RoQ connection is not available anymore.
Definition roq.c:201
void imquic_roq_stream_incoming(imquic_connection *conn, uint64_t stream_id, uint8_t *bytes, uint64_t offset, uint64_t length, gboolean complete)
Callback the core invokes when there's new incoming data on a STREAM.
Definition roq.c:149
void imquic_roq_new_connection(imquic_connection *conn, void *user_data)
Callback the core invokes when a new QUIC connection using RoQ is available.
Definition roq.c:129
Semaphores, Mutexes and Conditions.
GMutex imquic_mutex
imquic mutex implementation
Definition mutex.h:18
Reference counter mechanism.
QUIC Connection.
Definition connection.h:101
Definition refcount.h:77
RoQ public callbacks.
Definition internal/roq.h:61
void(* connection_gone)(imquic_connection *conn)
Callback function to be notified about RoQ connections being closed.
Definition internal/roq.h:67
void(* rtp_incoming)(imquic_connection *conn, uint64_t flow_id, uint8_t *bytes, size_t blen)
Callback function to be notified about incoming RTP packets.
Definition internal/roq.h:65
void(* new_connection)(imquic_connection *conn, void *user_data)
Callback function to be notified about new RoQ connections.
Definition internal/roq.h:63
RoQ endpoint instance.
Definition internal/roq.h:35
imquic_connection * conn
Associated QUIC connection.
Definition internal/roq.h:37
GHashTable * packets
Current packet buffer, indexed by stream ID.
Definition internal/roq.h:41
GHashTable * stream_flows_out
Definition internal/roq.h:39
GHashTable * stream_flows_in
Stream flows, indexed by stream ID.
Definition internal/roq.h:39
imquic_mutex mutex
Mutex.
Definition internal/roq.h:43
RoQ stream (when using the same stream for multiple packets)
Definition internal/roq.h:47
uint64_t stream_id
QUIC Stream ID.
Definition internal/roq.h:49
uint64_t offset
Offset in the QUIC STREAM where to write the next packet.
Definition internal/roq.h:53
volatile gint destroyed
Whether this instance has been destroyed (reference counting)
Definition internal/roq.h:55
uint64_t flow_id
RoQ Flow ID.
Definition internal/roq.h:51
imquic_refcount ref
Reference counter.
Definition internal/roq.h:57