VLC 4.0.0-dev
|
HTTP connection management. More...
Modules | |
Connections | |
HTTP connections. | |
Streams | |
HTTP request/response streams. | |
Files | |
file | connmgr.h |
Functions | |
struct vlc_http_msg * | vlc_http_mgr_request (struct vlc_http_mgr *mgr, bool https, const char *host, unsigned port, const struct vlc_http_msg *req, bool idempotent, bool payload) |
Sends an HTTP request. | |
struct vlc_http_cookie_jar_t * | vlc_http_mgr_get_jar (struct vlc_http_mgr *) |
struct vlc_http_mgr * | vlc_http_mgr_create (vlc_object_t *obj, struct vlc_http_cookie_jar_t *jar) |
Creates an HTTP connection manager. | |
void | vlc_http_mgr_destroy (struct vlc_http_mgr *mgr) |
Destroys an HTTP connection manager. | |
HTTP connection management.
struct vlc_http_mgr * vlc_http_mgr_create | ( | vlc_object_t * | obj, |
struct vlc_http_cookie_jar_t * | jar | ||
) |
Creates an HTTP connection manager.
Allocates an HTTP client connections manager.
obj | parent VLC object |
jar | HTTP cookies jar (NULL to disable cookies) |
References vlc_http_mgr::conn, vlc_http_mgr::creds, vlc_http_mgr::jar, vlc_object_t::logger, vlc_http_mgr::logger, vlc_http_mgr::obj, and unlikely.
Referenced by Open().
void vlc_http_mgr_destroy | ( | struct vlc_http_mgr * | mgr | ) |
Destroys an HTTP connection manager.
Deallocates an HTTP client connections manager created by vlc_http_msg_destroy(). Any remaining connection is closed and destroyed.
References vlc_http_mgr::conn, vlc_http_mgr::creds, vlc_http_mgr_release(), and vlc_tls_ClientDelete().
struct vlc_http_cookie_jar_t * vlc_http_mgr_get_jar | ( | struct vlc_http_mgr * | mgr | ) |
References vlc_http_mgr::jar.
Referenced by vlc_http_outfile_create(), vlc_http_res_open(), and vlc_http_res_req().
struct vlc_http_msg * vlc_http_mgr_request | ( | struct vlc_http_mgr * | mgr, |
bool | https, | ||
const char * | host, | ||
unsigned | port, | ||
const struct vlc_http_msg * | req, | ||
bool | idempotent, | ||
bool | payload | ||
) |
Sends an HTTP request.
Sends an HTTP request, by either reusing an existing HTTP connection or establishing a new one. If successful, the initial HTTP response header is returned.
mgr | HTTP connection manager |
https | whether to use HTTPS (true) or unencrypted HTTP (false) |
host | name of authoritative HTTP server to send the request to |
port | TCP server port number, or 0 for the default port number |
req | HTTP request header to send |
idempotent | whether the request is idempotent |
payload | whether the request will carry a payload |
References vlc_http_msg::payload, vlc_http_port_blocked(), vlc_http_request(), and vlc_https_request().
Referenced by vlc_http_outfile_create(), and vlc_http_res_open().