VLC  3.0.0-git
Modules | Files | Functions
Connection manager

HTTP connection management. More...

Collaboration diagram for Connection manager:


 HTTP connections.
 HTTP request/response streams.


file  connmgr.h


struct vlc_http_msgvlc_http_mgr_request (struct vlc_http_mgr *mgr, bool https, const char *host, unsigned port, const struct vlc_http_msg *req)
 Sends an HTTP request. More...
struct vlc_http_cookie_jar_tvlc_http_mgr_get_jar (struct vlc_http_mgr *)
struct vlc_http_mgrvlc_http_mgr_create (vlc_object_t *obj, struct vlc_http_cookie_jar_t *jar)
 Creates an HTTP connection manager. More...
void vlc_http_mgr_destroy (struct vlc_http_mgr *mgr)
 Destroys an HTTP connection manager. More...

Detailed Description

HTTP connection management.

Function Documentation

◆ vlc_http_mgr_create()

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.

objparent VLC object
jarHTTP cookies jar (NULL to disable cookies)

References vlc_http_mgr::conn, vlc_http_mgr::creds, vlc_http_mgr::jar, vlc_http_mgr::obj, and unlikely.

Referenced by Open().

◆ vlc_http_mgr_destroy()

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_Delete().

Referenced by Close(), and Open().

◆ vlc_http_mgr_get_jar()

struct vlc_http_cookie_jar_t* vlc_http_mgr_get_jar ( struct vlc_http_mgr )

References vlc_http_mgr::jar.

Referenced by vlc_http_res_open(), and vlc_http_res_req().

◆ vlc_http_mgr_request()

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 

Sends an HTTP request.

Sends an HTTP request, by either reusing an existing HTTP connection or establishing a new one. If succesful, the initial HTTP response header is returned.

mgrHTTP connection manager
httpswhether to use HTTPS (true) or unencrypted HTTP (false)
hostname of authoritative HTTP server to send the request to
portTCP server port number, or 0 for the default port number
reqHTTP request header to send
The initial HTTP response header, or NULL in case of failure.

References vlc_http_request(), and vlc_https_request().

Referenced by vlc_http_res_open().