VLC
3.0.15
|
Data Structures | |
struct | vlc_http_stream_cbs |
HTTP stream callbacks. More... | |
struct | vlc_http_stream |
HTTP stream. More... | |
Functions | |
void | vlc_http_msg_attach (struct vlc_http_msg *m, struct vlc_http_stream *s) |
struct vlc_http_msg * | vlc_http_msg_get_initial (struct vlc_http_stream *s) VLC_USED |
static struct vlc_http_msg * | vlc_http_stream_read_headers (struct vlc_http_stream *s) |
Reads one message header. More... | |
static struct block_t * | vlc_http_stream_read (struct vlc_http_stream *s) |
Reads message payload data. More... | |
static void | vlc_http_stream_close (struct vlc_http_stream *s, bool abort) |
Closes an HTTP stream. More... | |
Variables | |
void *const | vlc_http_error |
Error pointer value. More... | |
HTTP request/response streams
A stream is initiated by a client-side request header. It includes a final response header, possibly preceded by one or more continuation response headers. After the response header, a stream usually carries a response payload.
A stream may also carry a request payload (this is not supported so far).
The HTTP stream constitutes the interface between an HTTP connection and the higher-level HTTP messages layer.
void vlc_http_msg_attach | ( | struct vlc_http_msg * | m, |
struct vlc_http_stream * | s | ||
) |
References vlc_http_msg::payload.
Referenced by vlc_h1_stream_wait(), and vlc_h2_stream_wait().
struct vlc_http_msg* vlc_http_msg_get_initial | ( | struct vlc_http_stream * | s | ) |
References vlc_http_stream_close(), and vlc_http_stream_read_headers().
Referenced by vlc_http_mgr_reuse(), vlc_http_request(), and vlc_http_tunnel_open().
|
inlinestatic |
Closes an HTTP stream.
Releases all resources associated or held by an HTTP stream. Any unread header or data is discarded.
References vlc_http_stream::cbs, and vlc_http_stream_cbs::close.
Referenced by vlc_chunked_close(), vlc_http_msg_destroy(), and vlc_http_msg_get_initial().
|
inlinestatic |
Reads message payload data.
Reads the next block of data from the message payload of an HTTP stream.
NULL | The end of the stream was reached. |
vlc_http_error | The stream encountered a fatal error. |
References vlc_http_stream::cbs, and vlc_http_stream_cbs::read.
Referenced by vlc_http_msg_read().
|
inlinestatic |
Reads one message header.
Reads the next message header of an HTTP stream from the network. There is always exactly one request header per stream. There is usually one response header per stream, except for continuation (1xx) headers.
References vlc_http_stream::cbs, and vlc_http_stream_cbs::read_headers.
Referenced by vlc_http_msg_get_initial(), and vlc_http_msg_iterate().
void* const vlc_http_error |
Error pointer value.
This is an error value for some HTTP functions that can return NULL in non-error circumstances. Another return value is necessary to express error/failure, which this is. This compares different to NULL and to any valid pointer.
Referenced by vlc_chunked_fatal(), vlc_chunked_read(), vlc_h1_stream_read(), vlc_h2_stream_read(), vlc_http_file_read(), and vlc_http_live_read().