VLC  3.0.15
Data Structures | Macros | Functions | Variables
h1conn.c File Reference
Include dependency graph for h1conn.c:

Data Structures

struct  vlc_h1_conn
 

Macros

#define CO(conn)   ((conn)->opaque)
 

Functions

static unsigned vlc_http_can_read (const char *buf, size_t len)
 
static char * vlc_https_headers_recv (struct vlc_tls *tls, size_t *restrict lenp)
 Receives HTTP headers. More...
 
static int vlc_http_minor (const char *msg)
 Gets minor HTTP version. More...
 
static void vlc_h1_conn_destroy (struct vlc_h1_conn *conn)
 
static void * vlc_h1_stream_fatal (struct vlc_h1_conn *conn)
 
static struct vlc_h1_connvlc_h1_stream_conn (struct vlc_http_stream *stream)
 
static struct vlc_http_streamvlc_h1_stream_open (struct vlc_http_conn *c, const struct vlc_http_msg *req)
 
static struct vlc_http_msgvlc_h1_stream_wait (struct vlc_http_stream *stream)
 
static block_tvlc_h1_stream_read (struct vlc_http_stream *stream)
 
static void vlc_h1_stream_close (struct vlc_http_stream *stream, bool abort)
 
static void vlc_h1_conn_release (struct vlc_http_conn *c)
 
struct vlc_http_connvlc_h1_conn_create (void *ctx, vlc_tls_t *tls, bool proxy)
 
struct vlc_http_streamvlc_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. More...
 

Variables

static const struct vlc_http_stream_cbs vlc_h1_stream_callbacks
 
static const struct vlc_http_conn_cbs vlc_h1_conn_callbacks
 

Macro Definition Documentation

◆ CO

#define CO (   conn)    ((conn)->opaque)

Function Documentation

◆ vlc_h1_conn_destroy()

static void vlc_h1_conn_destroy ( struct vlc_h1_conn conn)
static

◆ vlc_h1_conn_release()

static void vlc_h1_conn_release ( struct vlc_http_conn c)
static

◆ vlc_h1_stream_close()

static void vlc_h1_stream_close ( struct vlc_http_stream stream,
bool  abort 
)
static

◆ vlc_h1_stream_conn()

static struct vlc_h1_conn* vlc_h1_stream_conn ( struct vlc_http_stream stream)
static

◆ vlc_h1_stream_fatal()

static void* vlc_h1_stream_fatal ( struct vlc_h1_conn conn)
static

◆ vlc_h1_stream_open()

static struct vlc_http_stream* vlc_h1_stream_open ( struct vlc_http_conn c,
const struct vlc_http_msg req 
)
static

◆ vlc_h1_stream_read()

static block_t* vlc_h1_stream_read ( struct vlc_http_stream stream)
static

◆ vlc_h1_stream_wait()

static struct vlc_http_msg* vlc_h1_stream_wait ( struct vlc_http_stream stream)
static

◆ vlc_http_can_read()

static unsigned vlc_http_can_read ( const char *  buf,
size_t  len 
)
static

Referenced by vlc_https_headers_recv().

◆ vlc_http_minor()

static int vlc_http_minor ( const char *  msg)
static

Gets minor HTTP version.

Referenced by vlc_h1_stream_wait().

◆ vlc_https_headers_recv()

static char* vlc_https_headers_recv ( struct vlc_tls tls,
size_t *restrict  lenp 
)
static

Receives HTTP headers.

Receives HTTP 1.x response line and headers.

Returns
A heap-allocated null-terminated string contained the full headers, including the final CRLF.

References unlikely, vlc_http_can_read(), and vlc_tls_Read().

Referenced by vlc_h1_stream_wait().

Variable Documentation

◆ vlc_h1_conn_callbacks

const struct vlc_http_conn_cbs vlc_h1_conn_callbacks
static
Initial value:

Referenced by vlc_h1_conn_create().

◆ vlc_h1_stream_callbacks

const struct vlc_http_stream_cbs vlc_h1_stream_callbacks
static
vlc_h1_stream_close
static void vlc_h1_stream_close(struct vlc_http_stream *stream, bool abort)
Definition: h1conn.c:270
vlc_h1_stream_open
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_h1_stream_wait
static struct vlc_http_msg * vlc_h1_stream_wait(struct vlc_http_stream *stream)
Definition: h1conn.c:169
vlc_h1_conn_release
static void vlc_h1_conn_release(struct vlc_http_conn *c)
Definition: h1conn.c:305
vlc_h1_stream_read
static block_t * vlc_h1_stream_read(struct vlc_http_stream *stream)
Definition: h1conn.c:230