Apache HTTPD
Macros | Functions
h2_c1_io.c File Reference
#include <assert.h>
#include <apr_strings.h>
#include <ap_mpm.h>
#include <mpm_common.h>
#include <httpd.h>
#include <http_core.h>
#include <http_log.h>
#include <http_connection.h>
#include <http_protocol.h>
#include <http_request.h>
#include <http_ssl.h>
#include "h2_private.h"
#include "h2_bucket_eos.h"
#include "h2_config.h"
#include "h2_c1.h"
#include "h2_c1_io.h"
#include "h2_protocol.h"
#include "h2_session.h"
#include "h2_util.h"

Go to the source code of this file.

Macros

#define TLS_DATA_MAX   (16*1024)
 
#define WRITE_SIZE_INITIAL   1300
 
#define WRITE_SIZE_MAX   (TLS_DATA_MAX)
 
#define BUF_REMAIN   ((apr_size_t)(bmax-off))
 
#define C1_IO_BB_LOG(c, stream_id, level, tag, bb)
 

Functions

static void h2_c1_io_bb_log (conn_rec *c, int stream_id, int level, const char *tag, apr_bucket_brigade *bb)
 
apr_status_t h2_c1_io_init (h2_c1_io *io, h2_session *session)
 
static void append_scratch (h2_c1_io *io)
 
static apr_size_t assure_scratch_space (h2_c1_io *io)
 
static apr_status_t read_to_scratch (h2_c1_io *io, apr_bucket *b)
 
static apr_status_t pass_output (h2_c1_io *io, int flush)
 
int h2_c1_io_needs_flush (h2_c1_io *io)
 
int h2_c1_io_pending (h2_c1_io *io)
 
apr_status_t h2_c1_io_pass (h2_c1_io *io)
 
apr_status_t h2_c1_io_assure_flushed (h2_c1_io *io)
 
apr_status_t h2_c1_io_add_data (h2_c1_io *io, const char *data, size_t length)
 
apr_status_t h2_c1_io_append (h2_c1_io *io, apr_bucket_brigade *bb)
 
static apr_status_t c1_in_feed_bucket (h2_session *session, apr_bucket *b, apr_ssize_t *inout_len)
 
static apr_status_t c1_in_feed_brigade (h2_session *session, apr_bucket_brigade *bb, apr_ssize_t *inout_len)
 
static apr_status_t read_and_feed (h2_session *session)
 
apr_status_t h2_c1_read (h2_session *session)
 

Macro Definition Documentation

◆ BUF_REMAIN

#define BUF_REMAIN   ((apr_size_t)(bmax-off))

Definition at line 59 of file h2_c1_io.c.

◆ C1_IO_BB_LOG

#define C1_IO_BB_LOG (   c,
  stream_id,
  level,
  tag,
  bb 
)
Value:
if (APLOG_C_IS_LEVEL(c, level)) { \
h2_c1_io_bb_log((c), (stream_id), (level), (tag), (bb)); \
}
#define APLOG_C_IS_LEVEL(c, level)
Definition http_log.h:225
apr_size_t size
apr_vformatter_buff_t * c
Definition apr_lib.h:175

Definition at line 135 of file h2_c1_io.c.

◆ TLS_DATA_MAX

#define TLS_DATA_MAX   (16*1024)

Definition at line 39 of file h2_c1_io.c.

◆ WRITE_SIZE_INITIAL

#define WRITE_SIZE_INITIAL   1300

Definition at line 45 of file h2_c1_io.c.

◆ WRITE_SIZE_MAX

#define WRITE_SIZE_MAX   (TLS_DATA_MAX)

Definition at line 57 of file h2_c1_io.c.

Function Documentation

◆ append_scratch()

static void append_scratch ( h2_c1_io io)
static

Definition at line 179 of file h2_c1_io.c.

◆ assure_scratch_space()

static apr_size_t assure_scratch_space ( h2_c1_io io)
static

Definition at line 192 of file h2_c1_io.c.

◆ c1_in_feed_brigade()

static apr_status_t c1_in_feed_brigade ( h2_session session,
apr_bucket_brigade bb,
apr_ssize_t inout_len 
)
static

Definition at line 473 of file h2_c1_io.c.

◆ c1_in_feed_bucket()

static apr_status_t c1_in_feed_bucket ( h2_session session,
apr_bucket b,
apr_ssize_t inout_len 
)
static

Definition at line 438 of file h2_c1_io.c.

◆ h2_c1_io_add_data()

apr_status_t h2_c1_io_add_data ( h2_c1_io io,
const char buf,
size_t  length 
)

Append data to the buffered output.

Parameters
bufthe data to append
lengththe length of the data to append

Definition at line 361 of file h2_c1_io.c.

◆ h2_c1_io_append()

apr_status_t h2_c1_io_append ( h2_c1_io io,
apr_bucket_brigade bb 
)

Definition at line 392 of file h2_c1_io.c.

◆ h2_c1_io_assure_flushed()

apr_status_t h2_c1_io_assure_flushed ( h2_c1_io io)

if there is any data pendiong or was any data send since the last FLUSH, send out a FLUSH now.

Definition at line 349 of file h2_c1_io.c.

◆ h2_c1_io_bb_log()

static void h2_c1_io_bb_log ( conn_rec c,
int  stream_id,
int  level,
const char tag,
apr_bucket_brigade bb 
)
static

Definition at line 61 of file h2_c1_io.c.

◆ h2_c1_io_init()

apr_status_t h2_c1_io_init ( h2_c1_io io,
h2_session session 
)

Definition at line 141 of file h2_c1_io.c.

◆ h2_c1_io_needs_flush()

int h2_c1_io_needs_flush ( h2_c1_io io)

Check if the buffered amount of data needs flushing.

Definition at line 329 of file h2_c1_io.c.

◆ h2_c1_io_pass()

apr_status_t h2_c1_io_pass ( h2_c1_io io)

Pass any buffered data on to the connection output filters.

Parameters
iothe connection io

Definition at line 339 of file h2_c1_io.c.

◆ h2_c1_io_pending()

int h2_c1_io_pending ( h2_c1_io io)

Check if we have output pending.

Definition at line 334 of file h2_c1_io.c.

◆ h2_c1_read()

apr_status_t h2_c1_read ( struct h2_session session)

Read c1 input and pass it on to nghttp2.

Parameters
sessionthe session
when_pending!= 0 if only pending input (sitting in filters) needs to be read

Definition at line 518 of file h2_c1_io.c.

◆ pass_output()

static apr_status_t pass_output ( h2_c1_io io,
int  flush 
)
static

Definition at line 260 of file h2_c1_io.c.

◆ read_and_feed()

static apr_status_t read_and_feed ( h2_session session)
static

Definition at line 494 of file h2_c1_io.c.

◆ read_to_scratch()

static apr_status_t read_to_scratch ( h2_c1_io io,
apr_bucket b 
)
static

Definition at line 208 of file h2_c1_io.c.