Go to the documentation of this file.
40 unsigned count,
const char *
const headers[][2]);
88 #define VLC_H2_MAX_HEADER_TABLE 4096
89 #define VLC_H2_MAX_STREAMS 0
90 #define VLC_H2_INIT_WINDOW 1048575
91 #define VLC_H2_MAX_FRAME 1048576
92 #define VLC_H2_MAX_HEADER_LIST 65536
95 #define VLC_H2_DEFAULT_MAX_HEADER_TABLE 4096
96 #define VLC_H2_DEFAULT_INIT_WINDOW 65535
97 #define VLC_H2_DEFAULT_MAX_FRAME 16384
102 void (*
setting)(
void *ctx, uint_fast16_t id, uint_fast32_t value);
104 int (*
ping)(
void *ctx, uint_fast64_t opaque);
105 void (*
error)(
void *ctx, uint_fast32_t code);
106 int (*
reset)(
void *ctx, uint_fast32_t last_seq, uint_fast32_t code);
109 void *(*stream_lookup)(
void *ctx, uint_fast32_t id);
112 const char *
const headers[][2]);
123 #define VLC_H2_MAX_HEADERS 255
127 #define vlc_h2_frame_data_get(f, l) \
129 const struct vlc_h2_frame *: (vlc_h2_frame_data_get)(f, l), \
130 struct vlc_h2_frame *: (uint8_t *)(vlc_h2_frame_data_get)(f, l))
struct hpack_decoder * hpack_decode_init(size_t header_table_size)
Definition: hpack.c:71
static struct vlc_h1_conn * vlc_h1_stream_conn(struct vlc_http_stream *stream)
Definition: h1conn.c:137
static int vlc_h2_parse_frame_settings(struct vlc_h2_parser *p, struct vlc_h2_frame *f, size_t len, uint_fast32_t id)
Parses an HTTP/2 SETTINGS frame.
Definition: h2frame.c:725
struct vlc_http_conn * vlc_h2_conn_create(void *ctx, struct vlc_tls *tls)
Definition: h2conn.c:719
size_t count
Definition: core.c:461
vlc_thread_t thread
Receive thread.
Definition: h2conn.c:60
Definition: h2frame.c:134
static int vlc_h2_conn_queue(struct vlc_h2_conn *conn, struct vlc_h2_frame *f)
Definition: h2conn.c:85
#define GetDWBE(p)
Definition: vlc_common.h:821
uint32_t sid
Definition: h2frame.c:458
static int vlc_h2_stream_reset(void *ctx, uint_fast32_t code)
Reports remote stream error.
Definition: h2conn.c:199
void vlc_restorecancel(int state)
Restores the cancellation state.
Definition: thread.c:323
static void vlc_h2_stream_close(struct vlc_http_stream *stream, bool aborted)
Terminates a stream.
Definition: h2conn.c:338
static block_t * vlc_h2_stream_read(struct vlc_http_stream *stream)
Receives stream data.
Definition: h2conn.c:270
#define vlc_cleanup_push(routine, arg)
Registers a thread cancellation handler.
Definition: vlc_threads.h:975
static int vlc_h2_parse_generic(struct vlc_h2_parser *, struct vlc_h2_frame *, size_t, uint_fast32_t)
Parses any HTTP/2 frame.
Definition: h2frame.c:952
Definition: h2frame.c:138
size_t len
Definition: h2frame.c:460
#define VLC_H2_MAX_STREAMS
Definition: h2frame.h:88
#define VLC_H2_MAX_FRAME
Definition: h2frame.h:90
ssize_t vlc_tls_Write(vlc_tls_t *session, const void *buf, size_t len)
Sends data through a socket.
Definition: tls.c:268
struct hpack_decoder * decoder
Definition: h2frame.c:462
static int vlc_h2_parse_headers_append(struct vlc_h2_parser *p, const uint8_t *data, size_t len)
Definition: h2frame.c:503
static int vlc_h2_parse_frame_continuation(struct vlc_h2_parser *p, struct vlc_h2_frame *f, size_t len, uint_fast32_t id)
Parses an HTTP/2 CONTINUATION frame.
Definition: h2frame.c:871
static void * vlc_h2_stream_lookup(struct vlc_h2_parser *p, uint_fast32_t id)
Definition: h2frame.c:486
static struct vlc_http_msg * vlc_h2_stream_wait(struct vlc_http_stream *stream)
Definition: h2conn.c:238
struct vlc_h2_frame * vlc_http_msg_h2_frame(const struct vlc_http_msg *m, uint_fast32_t stream_id, bool eos)
Formats an HTTP 2.0 HEADER frame.
Definition: message.c:390
const struct vlc_http_stream_cbs * cbs
Definition: message.h:342
const char * vlc_h2_strerror(uint_fast32_t code)
Definition: h2frame.c:383
struct vlc_http_stream * vlc_chunked_open(struct vlc_http_stream *parent, struct vlc_tls *tls)
Definition: chunked.c:153
static int vlc_h2_parse_frame_unknown(struct vlc_h2_parser *p, struct vlc_h2_frame *f, size_t len, uint_fast32_t id)
Parses an HTTP/2 frame of unknown type.
Definition: h2frame.c:900
struct vlc_h2_frame * recv_head
Earliest pending received buffer.
Definition: h2conn.c:80
int(* stream_data)(void *ctx, struct vlc_h2_frame *f)
Definition: h2frame.h:112
#define vlc_h2_frame_payload(f)
Definition: h2frame.c:64
struct vlc_h2_frame ** recv_tailp
Tail of receive queue.
Definition: h2conn.c:81
static const char * vlc_h2_type_name(uint_fast8_t type)
Definition: h2frame.c:105
static int vlc_h2_parse_headers_block(struct vlc_h2_parser *, struct vlc_h2_frame *, size_t, uint_fast32_t)
Definition: h2frame.c:968
void(* window_status)(void *ctx, uint32_t *rcwd)
Definition: h2frame.h:106
HTTP/2 incoming frames parser.
Definition: h2frame.c:449
void(* setting)(void *ctx, uint_fast16_t id, uint_fast32_t value)
Definition: h2frame.h:101
struct vlc_h2_frame * vlc_h2_frame_pong(uint64_t opaque)
Definition: h2frame.c:344
static void vlc_h1_stream_close(struct vlc_http_stream *stream, bool abort)
Definition: h1conn.c:270
void(* stream_end)(void *ctx)
Definition: h2frame.h:113
static int vlc_h2_stream_error(void *ctx, uint_fast32_t id, uint_fast32_t code)
Reports a local stream error.
Definition: h2conn.c:113
static void vlc_h2_parse_headers_start(struct vlc_h2_parser *p, uint_fast32_t sid, bool eos)
Definition: h2frame.c:491
size_t i_buffer
Payload length.
Definition: vlc_block.h:116
void * opaque
Definition: h2conn.c:53
void void vlc_http_dbg(void *, const char *msg,...) VLC_FORMAT(2
struct vlc_http_msg * vlc_http_msg_h2_headers(unsigned n, const char *const hdrs[][2])
Parses an HTTP 2.0 header table.
Definition: message.c:452
const struct vlc_http_conn_cbs * cbs
Definition: conn.h:41
int fd
Definition: vlc_fixups.h:416
static void vlc_h2_error(void *ctx, uint_fast32_t code)
Reports a local HTTP/2 connection failure.
Definition: h2conn.c:479
ssize_t vlc_tls_Read(vlc_tls_t *session, void *buf, size_t len, bool waitall)
Receives data through a socket.
Definition: tls.c:227
static const struct vlc_http_conn_cbs vlc_h1_conn_callbacks
Definition: h1conn.c:316
void vlc_http_msg_destroy(struct vlc_http_msg *m)
Destroys an HTTP message.
Definition: message.c:191
bool released
Definition: h1conn.c:116
#define vlc_h2_frame_data_get(f, l)
Definition: h2frame.h:126
static void * vlc_h2_recv_thread(void *data)
HTTP/2 receive thread.
Definition: h2conn.c:639
uintmax_t content_length
Definition: h1conn.c:113
#define CO(conn)
Definition: h1conn.c:121
#define VLC_H2_DEFAULT_INIT_WINDOW
Definition: h2frame.h:95
Definition: vlc_fixups.h:414
static const struct vlc_http_stream_cbs vlc_h2_stream_callbacks
Definition: h2conn.c:381
struct vlc_http_conn * vlc_h1_conn_create(void *ctx, vlc_tls_t *tls, bool proxy)
Definition: h1conn.c:322
bool interrupted
Definition: h2conn.c:74
Transport layer socket.
Definition: vlc_tls.h:43
static struct vlc_h2_frame * vlc_h2_frame_recv(struct vlc_tls *tls)
Receives an HTTP/2 frame through TLS.
Definition: h2conn.c:602
static uint_fast8_t vlc_h2_frame_type(const struct vlc_h2_frame *f)
Definition: h2frame.c:77
#define SO(s)
Definition: h2conn.c:46
block_t * block_heap_Alloc(void *addr, size_t length)
Wraps heap in a block.
Definition: block.c:253
static void cleanup_parser(void *data)
Definition: h2conn.c:633
HTTP/2 connection.
Definition: h2conn.c:49
static struct vlc_h2_frame * vlc_h2_frame_alloc(uint_fast8_t type, uint_fast8_t flags, uint_fast32_t stream_id, size_t length)
Definition: h2frame.c:39
struct vlc_h2_frame * vlc_h2_frame_settings_ack(void)
Definition: h2frame.c:313
int recv_err
Standard C error code.
Definition: h2conn.c:76
static char * vlc_https_headers_recv(struct vlc_tls *tls, size_t *restrict lenp)
Receives HTTP headers.
Definition: h1conn.c:56
int poll(struct pollfd *, unsigned, int)
void vlc_h2_frame_dump(void *opaque, const struct vlc_h2_frame *f, const char *msg)
Definition: h2frame.c:407
void vlc_cond_broadcast(vlc_cond_t *p_condvar)
Wakes up all threads waiting on a condition variable.
Definition: thread.c:262
const struct vlc_h2_parser_cbs * cbs
Definition: h2frame.c:452
int vlc_getaddrinfo_i11e(const char *name, unsigned port, const struct addrinfo *hints, struct addrinfo **res)
Definition: getaddrinfo.c:38
size_t recv_cwnd
Free space in receive congestion window.
Definition: h2conn.c:79
int vlc_clone(vlc_thread_t *th, void *(*entry)(void *), void *data, int priority)
Creates and starts a new thread.
Definition: thread.c:263
static int vlc_h2_parse_frame_window_update(struct vlc_h2_parser *p, struct vlc_h2_frame *f, size_t len, uint_fast32_t id)
Parses an HTTP/2 WINDOW_UPDATE frame.
Definition: h2frame.c:853
const char * vlc_http_next_token(const char *value)
Finds next token.
Definition: message.c:595
static void vlc_h2_window_status(void *ctx, uint32_t *restrict rcwd)
Definition: h2conn.c:516
struct vlc_h2_output * vlc_h2_output_create(struct vlc_tls *tls, bool client)
Definition: h2output.c:300
Definition: h2frame.c:100
struct vlc_http_stream * vlc_h1_request(void *ctx, const char *hostname, unsigned port, bool proxy, const struct vlc_http_msg *req, bool idempotent, struct vlc_http_conn **restrict connp)
Sends an HTTP/1.x request through a new connection.
Definition: h1conn.c:339
uint8_t * buf
Definition: h2frame.c:461
void vlc_cond_signal(vlc_cond_t *p_condvar)
Wakes up one thread waiting on a condition variable.
Definition: thread.c:256
static void vlc_h2_stream_headers(void *ctx, unsigned count, const char *const hdrs[][2])
Reports received stream headers.
Definition: h2conn.c:134
pthread_cond_t vlc_cond_t
Condition variable.
Definition: vlc_threads.h:279
bool active
Definition: h1conn.c:115
HTTP stream callbacks.
Definition: message.h:332
struct vlc_h2_stream * streams
List of open streams.
Definition: h2conn.c:55
static int vlc_h2_parse_frame_data(struct vlc_h2_parser *p, struct vlc_h2_frame *f, size_t len, uint_fast32_t id)
Parses an HTTP/2 DATA frame.
Definition: h2frame.c:574
#define VLC_H2_MAX_HEADERS
Definition: h2frame.h:122
static void vlc_h1_conn_destroy(struct vlc_h1_conn *conn)
Definition: h1conn.c:292
static struct vlc_http_stream * vlc_h1_stream_open(struct vlc_http_conn *c, const struct vlc_http_msg *req)
Definition: h1conn.c:142
vlc_h2_error
Definition: h2frame.h:56
struct vlc_h2_frame * vlc_h2_frame_ping(uint64_t opaque)
Definition: h2frame.c:336
const uint8_t *() vlc_h2_frame_data_get(const struct vlc_h2_frame *f, size_t *restrict lenp)
Definition: h2frame.c:425
struct vlc_http_stream * payload
Definition: message.c:66
#define VLC_H2_MAX_HEADER_TABLE
Definition: h2frame.h:87
Definition: h2frame.c:102
struct vlc_h2_frame * next
Definition: h2frame.h:31
static void SetDWBE(void *p, uint32_t dw)
Writes 32 bits in network byte order.
Definition: vlc_common.h:871
void vlc_interrupt_register(void(*cb)(void *), void *opaque)
Registers a custom interrupt handler.
Definition: interrupt.c:160
int(* stream_reset)(void *ctx, uint_fast32_t code)
Definition: h2frame.h:114
static const struct vlc_h2_parser_cbs vlc_h2_parser_callbacks
HTTP/2 frames parser callbacks table.
Definition: h2conn.c:529
bool recv_end
End-of-stream flag.
Definition: h2conn.c:75
int vlc_interrupt_unregister(void)
Definition: interrupt.c:167
static uint_fast32_t vlc_h2_frame_length(const struct vlc_h2_frame *f)
Definition: h2frame.c:66
static int vlc_h2_parse_frame_rst_stream(struct vlc_h2_parser *p, struct vlc_h2_frame *f, size_t len, uint_fast32_t id)
Parses an HTTP/2 RST_STREAM frame.
Definition: h2frame.c:698
void * opaque
Definition: h1conn.c:118
static void vlc_h2_stream_end(void *ctx)
Reports received end of stream.
Definition: h2conn.c:188
bool eos
Definition: h2frame.c:459
static int vlc_h2_parse_frame_priority(struct vlc_h2_parser *p, struct vlc_h2_frame *f, size_t len, uint_fast32_t id)
Parses an HTTP/2 PRIORITY frame.
Definition: h2frame.c:681
ssize_t(* readv)(struct vlc_tls *, struct iovec *, unsigned)
Definition: vlc_tls.h:46
bool connection_close
Definition: h1conn.c:114
Definition: h2frame.c:143
static int vlc_h2_stream_data(void *ctx, struct vlc_h2_frame *f)
Reports received stream data.
Definition: h2conn.c:161
void hpack_decode_destroy(struct hpack_decoder *dec)
Definition: hpack.c:84
vlc_h2_setting
Definition: h2frame.h:75
struct vlc_h2_frame * vlc_h2_frame_rst_stream(uint_fast32_t stream_id, uint_fast32_t error_code)
Definition: h2frame.c:241
struct vlc_h2_conn * conn
Underlying HTTP/2 connection.
Definition: h2conn.c:69
Definition: h2frame.c:147
struct vlc_http_stream stream
Base class.
Definition: h2conn.c:68
const char * vlc_http_msg_get_token(const struct vlc_http_msg *msg, const char *field, const char *token)
Looks up a token in a header field.
Definition: message.c:662
static int vlc_h2_parse_headers_end(struct vlc_h2_parser *p)
Definition: h2frame.c:521
void vlc_h2_parse_destroy(struct vlc_h2_parser *p)
Definition: h2frame.c:1036
static int vlc_h2_conn_queue_prio(struct vlc_h2_conn *conn, struct vlc_h2_frame *f)
Definition: h2conn.c:91
static int vlc_tls_GetFD(vlc_tls_t *tls)
Definition: vlc_tls.h:187
static void block_Release(block_t *block)
Releases a block.
Definition: vlc_block.h:181
static int vlc_h2_stream_error(struct vlc_h2_parser *p, uint_fast32_t id, uint_fast32_t code)
Definition: h2frame.c:480
struct vlc_h2_stream * newer
Next open stream in connection.
Definition: h2conn.c:71
short events
Definition: vlc_fixups.h:417
#define VLC_H2_DEFAULT_MAX_FRAME
Definition: h2frame.h:96
static struct vlc_http_msg * vlc_h1_stream_wait(struct vlc_http_stream *stream)
Definition: h1conn.c:169
static unsigned vlc_http_can_read(const char *buf, size_t len)
Definition: h1conn.c:38
Thread handle.
Definition: vlc_threads.h:252
static void SetWBE(void *p, uint16_t w)
Writes 16 bits in network byte order.
Definition: vlc_common.h:864
int vlc_h2_parse(struct vlc_h2_parser *p, struct vlc_h2_frame *f)
Definition: h2frame.c:993
static uint_fast32_t vlc_h2_frame_id(const struct vlc_h2_frame *f)
Definition: h2frame.c:87
void vlc_mutex_init(vlc_mutex_t *p_mutex)
Initializes a fast mutex.
Definition: thread.c:85
static int vlc_h2_parse_error(struct vlc_h2_parser *p, uint_fast32_t code)
Definition: h2frame.c:474
static int vlc_h2_ping(void *ctx, uint_fast64_t opaque)
Reports a ping received from HTTP/2 peer.
Definition: h2conn.c:471
Definition: h2frame.c:101
bool released
Connection released by owner.
Definition: h2conn.c:57
#define vlc_cleanup_pop()
Unregisters the last cancellation handler.
Definition: vlc_threads.h:983
static int vlc_h2_parse_frame_goaway(struct vlc_h2_parser *p, struct vlc_h2_frame *f, size_t len, uint_fast32_t id)
Parses an HTTP/2 GOAWAY frame.
Definition: h2frame.c:827
#define CO(c)
Definition: h2conn.c:45
#define POLLIN
Definition: vlc_fixups.h:411
static void vlc_tls_Close(vlc_tls_t *session)
Closes a connection and its underlying resources.
Definition: vlc_tls.h:257
static int vlc_h2_parse_frame_ping(struct vlc_h2_parser *p, struct vlc_h2_frame *f, size_t len, uint_fast32_t id)
Parses an HTTP/2 PING frame.
Definition: h2frame.c:796
static struct vlc_http_stream * vlc_h2_stream_open(struct vlc_http_conn *c, const struct vlc_http_msg *msg)
Creates a stream.
Definition: h2conn.c:400
HTTP stream.
Definition: message.h:340
struct vlc_h2_frame * vlc_h2_frame_settings(void)
Definition: h2frame.c:250
HTTP/2 stream.
Definition: h2conn.c:66
void *const vlc_http_error
Error pointer value.
Definition: message.c:55
static void * vlc_h1_stream_fatal(struct vlc_h1_conn *conn)
Definition: h1conn.c:125
int hpack_decode(struct hpack_decoder *dec, const uint8_t *data, size_t length, char *headers[][2], unsigned max)
Definition: hpack.c:574
static void vlc_h2_setting(void *ctx, uint_fast16_t id, uint_fast32_t value)
Reports an HTTP/2 peer connection setting.
Definition: h2conn.c:454
#define container_of(ptr, type, member)
Definition: vlc_common.h:944
vlc_cond_t recv_wait
Definition: h2conn.c:82
Definition: h2frame.c:151
static int vlc_h2_parse_failed(struct vlc_h2_parser *p, struct vlc_h2_frame *f, size_t len, uint_fast32_t id)
Definition: h2frame.c:985
struct vlc_http_msg * vlc_http_msg_headers(const char *msg)
Parses an HTTP 1.1 message header.
Definition: message.c:331
struct vlc_http_msg * recv_hdr
Latest received headers (or NULL)
Definition: h2conn.c:77
#define likely(p)
Definition: vlc_common.h:113
struct vlc_h2_parser::@225 headers
int vlc_savecancel(void)
Disables thread cancellation.
Definition: thread.c:313
static void vlc_h1_conn_release(struct vlc_http_conn *c)
Definition: h1conn.c:305
Definition: h2frame.c:132
#define VLC_THREAD_PRIORITY_INPUT
Definition: vlc_threads.h:322
#define VLC_H2_INIT_WINDOW
Definition: h2frame.h:89
uint32_t id
Stream 31-bits identifier.
Definition: h2conn.c:72
pthread_mutex_t vlc_mutex_t
Mutex.
Definition: vlc_threads.h:267
static int vlc_h2_parse_preface(struct vlc_h2_parser *p, struct vlc_h2_frame *f, size_t len, uint_fast32_t id)
Parses the HTTP/2 connection preface.
Definition: h2frame.c:931
static void vlc_h2_stream_lock(struct vlc_h2_stream *s)
Definition: h2conn.c:223
static int vlc_h2_parse_frame_headers(struct vlc_h2_parser *p, struct vlc_h2_frame *f, size_t len, uint_fast32_t id)
Parses an HTTP/2 HEADERS frame.
Definition: h2frame.c:628
size_t vlc_h2_frame_size(const struct vlc_h2_frame *f)
Definition: h2frame.c:72
void vlc_http_msg_attach(struct vlc_http_msg *m, struct vlc_http_stream *s)
Definition: message.c:257
static const struct vlc_http_conn_cbs vlc_h2_conn_callbacks
Definition: h2conn.c:713
vlc_h2_parser parser
Definition: h2frame.c:454
static void vlc_http_conn_release(struct vlc_http_conn *conn)
Definition: conn.h:51
void(* error)(void *ctx, uint_fast32_t code)
Definition: h2frame.h:104
#define GetWBE(p)
Definition: vlc_common.h:820
int(* settings_done)(void *ctx)
Definition: h2frame.h:102
int(* ping)(void *ctx, uint_fast64_t opaque)
Definition: h2frame.h:103
const char * vlc_h2_setting_name(uint_fast16_t id)
Definition: h2frame.c:319
struct vlc_tls * tls
Definition: conn.h:42
static uint_fast8_t vlc_h2_frame_flags(const struct vlc_h2_frame *f)
Definition: h2frame.c:82
static int vlc_h2_stream_fatal(struct vlc_h2_stream *s, uint_fast32_t code)
Definition: h2conn.c:126
void vlc_cond_destroy(vlc_cond_t *p_condvar)
Deinitializes a condition variable.
Definition: thread.c:228
static int vlc_http_minor(const char *msg)
Gets minor HTTP version.
Definition: h1conn.c:100
struct vlc_h2_frame * vlc_h2_frame_data(uint_fast32_t stream_id, const void *buf, size_t len, bool eos)
Definition: h2frame.c:228
struct vlc_h2_frame * vlc_h2_frame_goaway(uint_fast32_t last_stream_id, uint_fast32_t error_code)
Definition: h2frame.c:354
void vlc_cond_init(vlc_cond_t *p_condvar)
Initializes a condition variable.
Definition: thread.c:216
void vlc_cond_wait(vlc_cond_t *p_condvar, vlc_mutex_t *p_mutex)
Waits on a condition variable.
Definition: thread.c:267
uint32_t rcwd_size
Definition: h2frame.c:465
static int vlc_h2_stream_unlock(struct vlc_h2_stream *s)
Definition: h2conn.c:232
Definition: h2frame.c:127
void vlc_mutex_destroy(vlc_mutex_t *p_mutex)
Deinitializes a mutex.
Definition: thread.c:110
static int vlc_h2_settings_done(void *ctx)
Reports end of HTTP/2 peer settings.
Definition: h2conn.c:463
#define VLC_H2_MAX_HEADER_LIST
Definition: h2frame.h:91
vlc_tls_t * vlc_tls_SocketOpenAddrInfo(const struct addrinfo *restrict info, bool defer_connect)
Definition: tls.c:563
struct vlc_http_conn conn
Definition: h1conn.c:111
void vlc_mutex_unlock(vlc_mutex_t *p_mutex)
Releases a mutex.
Definition: thread.c:138
Definition: h2frame.c:126
#define unlikely(p)
Definition: vlc_common.h:114
struct vlc_h2_frame * vlc_h2_frame_headers(uint_fast32_t stream_id, uint_fast32_t mtu, bool eos, unsigned count, const char *const headers[][2])
Definition: h2frame.c:155
block_t * block_Alloc(size_t size)
Allocates a block.
Definition: block.c:119
static void * vlc_h2_stream_lookup(void *ctx, uint_fast32_t id)
Looks a stream up by ID.
Definition: h2conn.c:102
static void vlc_h2_stream_wake_up(void *data)
Definition: h2conn.c:212
const char * vlc_strerror_c(int errnum)
Definition: error.c:34
uint32_t next_id
Next free stream identifier.
Definition: h2conn.c:56
static int vlc_h2_parse_frame_push_promise(struct vlc_h2_parser *p, struct vlc_h2_frame *f, size_t len, uint_fast32_t id)
Parses an HTTP/2 PUSH_PROMISE frame.
Definition: h2frame.c:760
Definition: h2frame.c:142
void vlc_cancel(vlc_thread_t thread_id)
Marks a thread as cancelled.
Definition: thread.c:297
struct vlc_http_conn conn
Definition: h2conn.c:51
#define VLC_H2_DEFAULT_MAX_HEADER_TABLE
Definition: h2frame.h:94
static void vlc_h2_conn_destroy(struct vlc_h2_conn *conn)
Definition: h2conn.c:680
uint8_t * p_buffer
Payload start.
Definition: vlc_block.h:115
Definition: h2output.c:46
void vlc_tls_SessionDelete(vlc_tls_t *session)
Destroys a TLS session down.
Definition: tls.c:154
void vlc_http_err(void *, const char *msg,...) VLC_FORMAT(2
static void vlc_h2_conn_release(struct vlc_http_conn *c)
Definition: h2conn.c:697
Definition: h2frame.c:131
void(* stream_headers)(void *ctx, unsigned count, const char *const headers[][2])
Definition: h2frame.h:110
struct vlc_h2_parser * vlc_h2_parse_init(void *ctx, const struct vlc_h2_parser_cbs *cbs)
Definition: h2frame.c:1013
int(* stream_error)(void *ctx, uint_fast32_t id, uint_fast32_t code)
Definition: h2frame.h:109
static ssize_t vlc_https_recv(vlc_tls_t *tls, void *buf, size_t len)
Receives TLS data.
Definition: h2conn.c:552
uintmax_t vlc_http_msg_get_size(const struct vlc_http_msg *m)
Gets HTTP payload length.
Definition: message.c:858
uint8_t data[]
Definition: h2frame.h:32
static block_t * vlc_h1_stream_read(struct vlc_http_stream *stream)
Definition: h1conn.c:230
int(* reset)(void *ctx, uint_fast32_t last_seq, uint_fast32_t code)
Definition: h2frame.h:105
static struct vlc_http_stream * vlc_http_stream_open(struct vlc_http_conn *conn, const struct vlc_http_msg *m)
Definition: conn.h:46
void vlc_mutex_lock(vlc_mutex_t *p_mutex)
Acquires a mutex.
Definition: thread.c:123
static const vlc_h2_parser vlc_h2_parsers[]
Definition: h2frame.c:917
struct vlc_h2_frame * vlc_h2_frame_window_update(uint_fast32_t stream_id, uint_fast32_t credit)
Definition: h2frame.c:368
char * vlc_http_msg_format(const struct vlc_http_msg *m, size_t *restrict lenp, bool proxied)
Formats an HTTP 1.1 message header.
Definition: message.c:299
Definition: vlc_block.h:111
static const struct vlc_http_stream_cbs vlc_h1_stream_callbacks
Definition: h1conn.c:285
void * opaque
Definition: h2frame.c:451
Definition: h2frame.c:133
vlc_mutex_t lock
State machine lock.
Definition: h2conn.c:59
int vlc_h2_output_send(struct vlc_h2_output *out, struct vlc_h2_frame *f)
Definition: h2output.c:119
static int vlc_h2_reset(void *ctx, uint_fast32_t last_seq, uint_fast32_t code)
Reports a remote HTTP/2 connection error.
Definition: h2conn.c:494
struct vlc_http_stream stream
Definition: h1conn.c:112
struct vlc_h2_stream * older
Previous open stream in connection.
Definition: h2conn.c:70
int vlc_h2_output_send_prio(struct vlc_h2_output *out, struct vlc_h2_frame *f)
Definition: h2output.c:114
void vlc_h2_output_destroy(struct vlc_h2_output *out)
Definition: h2output.c:331
void vlc_join(vlc_thread_t handle, void **result)
Waits for a thread to complete (if needed), then destroys it.
Definition: thread.c:270
static int vlc_tls_Shutdown(vlc_tls_t *tls, bool duplex)
Shuts a connection down.
Definition: vlc_tls.h:241
size_t hpack_encode(uint8_t *restrict buf, size_t size, const char *const headers[][2], unsigned count)
Definition: hpackenc.c:153
#define mutex_cleanup_push(lock)
Definition: vlc_threads.h:1013
struct vlc_h2_output * out
Send thread.
Definition: h2conn.c:52
bool proxy
Definition: h1conn.c:117