Apache2
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
h2_proxy_session.h File Reference
#include <nghttp2/nghttp2.h>
Include dependency graph for h2_proxy_session.h:

Go to the source code of this file.

Data Structures

struct  h2_proxy_session
 

Macros

#define H2_ALEN(a)   (sizeof(a)/sizeof((a)[0]))
 
#define H2_PROXY_REQ_URL_NOTE   "h2-proxy-req-url"
 

Typedefs

typedef struct h2_proxy_session h2_proxy_session
 
typedef void h2_proxy_request_done (h2_proxy_session *s, request_rec *r, apr_status_t status, int touched)
 

Enumerations

enum  h2_proxy_stream_state_t {
  H2_STREAM_ST_IDLE, H2_STREAM_ST_OPEN, H2_STREAM_ST_RESV_LOCAL, H2_STREAM_ST_RESV_REMOTE,
  H2_STREAM_ST_CLOSED_INPUT, H2_STREAM_ST_CLOSED_OUTPUT, H2_STREAM_ST_CLOSED
}
 
enum  h2_proxys_state {
  H2_PROXYS_ST_INIT, H2_PROXYS_ST_DONE, H2_PROXYS_ST_IDLE, H2_PROXYS_ST_BUSY,
  H2_PROXYS_ST_WAIT, H2_PROXYS_ST_LOCAL_SHUTDOWN, H2_PROXYS_ST_REMOTE_SHUTDOWN
}
 
enum  h2_proxys_event_t {
  H2_PROXYS_EV_INIT, H2_PROXYS_EV_LOCAL_GOAWAY, H2_PROXYS_EV_REMOTE_GOAWAY, H2_PROXYS_EV_CONN_ERROR,
  H2_PROXYS_EV_PROTO_ERROR, H2_PROXYS_EV_CONN_TIMEOUT, H2_PROXYS_EV_NO_IO, H2_PROXYS_EV_STREAM_SUBMITTED,
  H2_PROXYS_EV_STREAM_DONE, H2_PROXYS_EV_STREAM_RESUMED, H2_PROXYS_EV_DATA_READ, H2_PROXYS_EV_NGH2_DONE,
  H2_PROXYS_EV_PRE_CLOSE
}
 

Functions

h2_proxy_sessionh2_proxy_session_setup (const char *id, proxy_conn_rec *p_conn, proxy_server_conf *conf, int h2_front, unsigned char window_bits_connection, unsigned char window_bits_stream, h2_proxy_request_done *done)
 
apr_status_t h2_proxy_session_submit (h2_proxy_session *s, const char *url, request_rec *r, int standalone)
 
apr_status_t h2_proxy_session_process (h2_proxy_session *s)
 
void h2_proxy_session_cancel_all (h2_proxy_session *s)
 
void h2_proxy_session_cleanup (h2_proxy_session *s, h2_proxy_request_done *done)
 
void h2_proxy_session_update_window (h2_proxy_session *s, conn_rec *c, apr_off_t bytes)
 

Macro Definition Documentation

#define H2_ALEN (   a)    (sizeof(a)/sizeof((a)[0]))
#define H2_PROXY_REQ_URL_NOTE   "h2-proxy-req-url"

Typedef Documentation

typedef void h2_proxy_request_done(h2_proxy_session *s, request_rec *r, apr_status_t status, int touched)

Enumeration Type Documentation

Enumerator
H2_STREAM_ST_IDLE 
H2_STREAM_ST_OPEN 
H2_STREAM_ST_RESV_LOCAL 
H2_STREAM_ST_RESV_REMOTE 
H2_STREAM_ST_CLOSED_INPUT 
H2_STREAM_ST_CLOSED_OUTPUT 
H2_STREAM_ST_CLOSED 
Enumerator
H2_PROXYS_EV_INIT 
H2_PROXYS_EV_LOCAL_GOAWAY 
H2_PROXYS_EV_REMOTE_GOAWAY 
H2_PROXYS_EV_CONN_ERROR 
H2_PROXYS_EV_PROTO_ERROR 
H2_PROXYS_EV_CONN_TIMEOUT 
H2_PROXYS_EV_NO_IO 
H2_PROXYS_EV_STREAM_SUBMITTED 
H2_PROXYS_EV_STREAM_DONE 
H2_PROXYS_EV_STREAM_RESUMED 
H2_PROXYS_EV_DATA_READ 
H2_PROXYS_EV_NGH2_DONE 
H2_PROXYS_EV_PRE_CLOSE 
Enumerator
H2_PROXYS_ST_INIT 
H2_PROXYS_ST_DONE 
H2_PROXYS_ST_IDLE 
H2_PROXYS_ST_BUSY 
H2_PROXYS_ST_WAIT 
H2_PROXYS_ST_LOCAL_SHUTDOWN 
H2_PROXYS_ST_REMOTE_SHUTDOWN 

Function Documentation

void h2_proxy_session_cancel_all ( h2_proxy_session s)
void h2_proxy_session_cleanup ( h2_proxy_session s,
h2_proxy_request_done done 
)
apr_status_t h2_proxy_session_process ( h2_proxy_session s)

Perform a step in processing the proxy session. Will return aftert one read/write cycle and indicate session status by status code.

Parameters
sthe session to process
Returns
APR_EAGAIN when processing needs to be invoked again APR_SUCCESS when all streams have been processed, session still live APR_EOF when the session has been terminated
h2_proxy_session* h2_proxy_session_setup ( const char *  id,
proxy_conn_rec p_conn,
proxy_server_conf conf,
int  h2_front,
unsigned char  window_bits_connection,
unsigned char  window_bits_stream,
h2_proxy_request_done done 
)
apr_status_t h2_proxy_session_submit ( h2_proxy_session s,
const char *  url,
request_rec r,
int  standalone 
)
void h2_proxy_session_update_window ( h2_proxy_session s,
conn_rec c,
apr_off_t  bytes 
)