VLC  4.0.0-dev
h1conn.c File Reference
Include dependency graph for h1conn.c:

Data Structures

struct  vlc_h1_conn


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


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, bool has_data)
static struct vlc_http_msgvlc_h1_stream_wait (struct vlc_http_stream *stream)
static ssize_t vlc_h1_stream_write (struct vlc_http_stream *stream, const void *base, size_t length, bool eos)
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, bool has_data, struct vlc_http_conn **restrict connp)
 Sends an HTTP/1.x request through a new connection. More...


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)

◆ vlc_h1_conn_release()

static void vlc_h1_conn_release ( struct vlc_http_conn c)

◆ vlc_h1_stream_close()

static void vlc_h1_stream_close ( struct vlc_http_stream stream,
bool  abort 

◆ vlc_h1_stream_conn()

static struct vlc_h1_conn* vlc_h1_stream_conn ( struct vlc_http_stream stream)

◆ vlc_h1_stream_fatal()

static void* vlc_h1_stream_fatal ( struct vlc_h1_conn conn)

◆ vlc_h1_stream_open()

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

◆ vlc_h1_stream_read()

◆ vlc_h1_stream_wait()

◆ vlc_h1_stream_write()

static ssize_t vlc_h1_stream_write ( struct vlc_http_stream stream,
const void *  base,
size_t  length,
bool  eos 

◆ vlc_http_can_read()

static unsigned vlc_http_can_read ( const char *  buf,
size_t  len 

Referenced by vlc_https_headers_recv().

◆ vlc_http_minor()

static int vlc_http_minor ( const char *  msg)

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 

Receives HTTP headers.

Receives HTTP 1.x response line and headers.

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
Initial value:
static struct vlc_http_stream * vlc_h1_stream_open(struct vlc_http_conn *c, const struct vlc_http_msg *req, bool has_data)
Definition: h1conn.c:143
static void vlc_h1_conn_release(struct vlc_http_conn *c)
Definition: h1conn.c:332

Referenced by vlc_h1_conn_create().

◆ vlc_h1_stream_callbacks

const struct vlc_http_stream_cbs vlc_h1_stream_callbacks
Initial value:
static void vlc_h1_stream_close(struct vlc_http_stream *stream, bool abort)
Definition: h1conn.c:287
static struct vlc_http_msg * vlc_h1_stream_wait(struct vlc_http_stream *stream)
Definition: h1conn.c:170
static block_t * vlc_h1_stream_read(struct vlc_http_stream *stream)
Definition: h1conn.c:247
static ssize_t vlc_h1_stream_write(struct vlc_http_stream *stream, const void *base, size_t length, bool eos)
Definition: h1conn.c:231

Referenced by vlc_h1_conn_create().