VLC 4.0.0-dev
h2output.c File Reference
Include dependency graph for h2output.c:

Data Structures

struct  vlc_h2_queue
struct  vlc_h2_output


#define VLC_H2_MAX_QUEUE   (1u << 24)


static int vlc_h2_output_queue (struct vlc_h2_output *out, struct vlc_h2_queue *q, struct vlc_h2_frame *f)
 Queues one outgoing HTTP/2. More...
int vlc_h2_output_send_prio (struct vlc_h2_output *out, struct vlc_h2_frame *f)
int vlc_h2_output_send (struct vlc_h2_output *out, struct vlc_h2_frame *f)
static struct vlc_h2_framevlc_h2_output_dequeue (struct vlc_h2_output *out)
 Dequeues one outgoing HTTP/2. More...
static void vlc_h2_output_flush_unlocked (struct vlc_h2_output *out)
static ssize_t vlc_https_send (vlc_tls_t *tls, const void *buf, size_t len)
 Sends bytes to a connection. More...
static int vlc_h2_frame_send (struct vlc_tls *tls, struct vlc_h2_frame *f)
 Sends one HTTP/2 frame through TLS. More...
static void * vlc_h2_output_thread (void *data)
 Output thread. More...
static void * vlc_h2_client_output_thread (void *data)
struct vlc_h2_outputvlc_h2_output_create (struct vlc_tls *tls, bool client)
void vlc_h2_output_destroy (struct vlc_h2_output *out)

Macro Definition Documentation


#define VLC_H2_MAX_QUEUE   (1u << 24)

Function Documentation

◆ vlc_h2_client_output_thread()

◆ vlc_h2_frame_send()

static int vlc_h2_frame_send ( struct vlc_tls tls,
struct vlc_h2_frame f 

Sends one HTTP/2 frame through TLS.

This function sends a whole HTTP/2 frame through a TLS session, then releases the memory used by the frame.

The caller must "own" the write side of the TLS session.

This is a blocking function and may be a thread cancellation point.
0 on success, -1 if the connection failed

References vlc_h2_frame::data, vlc_cleanup_pop, vlc_cleanup_push, vlc_h2_frame_size(), and vlc_https_send().

Referenced by vlc_h2_output_thread().

◆ vlc_h2_output_dequeue()

◆ vlc_h2_output_flush_unlocked()

static void vlc_h2_output_flush_unlocked ( struct vlc_h2_output out)

◆ vlc_h2_output_queue()

◆ vlc_h2_output_thread()

◆ vlc_https_send()

static ssize_t vlc_https_send ( vlc_tls_t tls,
const void *  buf,
size_t  len 

Sends bytes to a connection.

This may be a cancellation point. The caller is responsible for serializing writes on a given connection.

References count, pollfd::events, pollfd::fd, vlc_tls::ops, poll(), POLLOUT, vlc_restorecancel(), vlc_savecancel(), vlc_tls_GetPollFD(), and vlc_tls_operations::writev.

Referenced by vlc_h2_client_output_thread(), and vlc_h2_frame_send().