VLC 4.0.0-dev
Loading...
Searching...
No Matches

HTTP connection management. More...

Collaboration diagram for Connection manager:

Modules

 Connections
 HTTP connections.
 
 Streams
 HTTP request/response streams.
 

Files

file  connmgr.h
 

Functions

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, bool idempotent, bool payload)
 Sends an HTTP request.
 
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.
 
void vlc_http_mgr_destroy (struct vlc_http_mgr *mgr)
 Destroys an HTTP connection manager.
 

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.

Parameters
objparent VLC object
jarHTTP 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().

◆ 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_ClientDelete().

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 mgr)

◆ 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,
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.

Parameters
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
idempotentwhether the request is idempotent
payloadwhether the request will carry a payload
Returns
The initial HTTP response header, or NULL in case of failure.

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