Apache HTTPD
Classes | Macros | Typedefs | Enumerations | Functions
h2_session.h File Reference
#include "h2_c1_io.h"
#include "h2.h"

Go to the source code of this file.

Classes

struct  h2_session
 

Macros

#define H2_SSSN_MSG(s, msg)
 
#define H2_SSSN_LOG(aplogno, s, msg)   aplogno H2_SSSN_MSG(s, msg)
 
#define H2_SSSN_STRM_MSG(s, stream_id, msg)    "h2_stream(%d-%lu-%d): "msg, s->child_num, (unsigned long)s->id, stream_id
 

Typedefs

typedef struct h2_session h2_session
 

Enumerations

enum  h2_session_event_t {
  H2_SESSION_EV_INIT , H2_SESSION_EV_INPUT_PENDING , H2_SESSION_EV_INPUT_EXHAUSTED , H2_SESSION_EV_LOCAL_GOAWAY ,
  H2_SESSION_EV_REMOTE_GOAWAY , H2_SESSION_EV_CONN_ERROR , H2_SESSION_EV_PROTO_ERROR , H2_SESSION_EV_CONN_TIMEOUT ,
  H2_SESSION_EV_NGH2_DONE , H2_SESSION_EV_MPM_STOPPING , H2_SESSION_EV_PRE_CLOSE , H2_SESSION_EV_NO_MORE_STREAMS
}
 

Functions

const charh2_session_state_str (h2_session_state state)
 
apr_status_t h2_session_create (h2_session **psession, conn_rec *c, request_rec *r, server_rec *, struct h2_workers *workers)
 
void h2_session_event (h2_session *session, h2_session_event_t ev, int err, const char *msg)
 
apr_status_t h2_session_process (h2_session *session, int async)
 
apr_status_t h2_session_pre_close (h2_session *session, int async)
 
void h2_session_abort (h2_session *session, apr_status_t reason)
 
int h2_session_push_enabled (h2_session *session)
 
struct h2_streamh2_session_push (h2_session *session, struct h2_stream *is, struct h2_push *push)
 
apr_status_t h2_session_set_prio (h2_session *session, struct h2_stream *stream, const struct h2_priority *prio)
 
void h2_session_dispatch_event (h2_session *session, h2_session_event_t ev, int arg, const char *msg)
 

Macro Definition Documentation

◆ H2_SSSN_LOG

#define H2_SSSN_LOG (   aplogno,
  s,
  msg 
)    aplogno H2_SSSN_MSG(s, msg)

Definition at line 201 of file h2_session.h.

◆ H2_SSSN_MSG

#define H2_SSSN_MSG (   s,
  msg 
)
Value:
"h2_session(%d-%lu,%s,%d): "msg, s->child_num, (unsigned long)s->id, \
s->open_streams
apr_size_t size
const char * s
Definition apr_strings.h:95
const char * h2_session_state_str(h2_session_state state)

Definition at line 196 of file h2_session.h.

◆ H2_SSSN_STRM_MSG

#define H2_SSSN_STRM_MSG (   s,
  stream_id,
  msg 
)     "h2_stream(%d-%lu-%d): "msg, s->child_num, (unsigned long)s->id, stream_id

Definition at line 203 of file h2_session.h.

Typedef Documentation

◆ h2_session

Enumeration Type Documentation

◆ h2_session_event_t

Enumerator
H2_SESSION_EV_INIT 
H2_SESSION_EV_INPUT_PENDING 
H2_SESSION_EV_INPUT_EXHAUSTED 
H2_SESSION_EV_LOCAL_GOAWAY 
H2_SESSION_EV_REMOTE_GOAWAY 
H2_SESSION_EV_CONN_ERROR 
H2_SESSION_EV_PROTO_ERROR 
H2_SESSION_EV_CONN_TIMEOUT 
H2_SESSION_EV_NGH2_DONE 
H2_SESSION_EV_MPM_STOPPING 
H2_SESSION_EV_PRE_CLOSE 
H2_SESSION_EV_NO_MORE_STREAMS 

Definition at line 49 of file h2_session.h.

Function Documentation

◆ h2_session_abort()

void h2_session_abort ( h2_session session,
apr_status_t  reason 
)

Called when a serious error occurred and the session needs to terminate without further connection io.

Parameters
sessionthe session to abort
reasonthe apache status that caused the abort

◆ h2_session_create()

apr_status_t h2_session_create ( h2_session **  psession,
conn_rec c,
request_rec r,
server_rec s,
struct h2_workers workers 
)

Create a new h2_session for the given connection. The session will apply the configured parameter.

Parameters
psessionpointer receiving the created session on success or NULL
cthe connection to work on
roptional request when protocol was upgraded
cfgthe module config to apply
workersthe worker pool to use
Returns
the created session

Definition at line 875 of file h2_session.c.

◆ h2_session_dispatch_event()

void h2_session_dispatch_event ( h2_session session,
h2_session_event_t  ev,
int  arg,
const char msg 
)

Dispatch a event happending during session processing.

Parameters
sessionthe sessiont
evthe event that happened
arginteger argument (event type dependant)
msgdestriptive message

Definition at line 1710 of file h2_session.c.

◆ h2_session_event()

void h2_session_event ( h2_session session,
h2_session_event_t  ev,
int  err,
const char msg 
)

Definition at line 84 of file h2_session.c.

◆ h2_session_pre_close()

apr_status_t h2_session_pre_close ( h2_session session,
int  async 
)

Last chance to do anything before the connection is closed.

Definition at line 2011 of file h2_session.c.

◆ h2_session_process()

apr_status_t h2_session_process ( h2_session session,
int  async 
)

Process the given HTTP/2 session until it is ended or a fatal error occurred.

Parameters
sessionthe sessionm to process

Definition at line 1765 of file h2_session.c.

◆ h2_session_push()

struct h2_stream * h2_session_push ( h2_session session,
struct h2_stream is,
struct h2_push push 
)

Submit a push promise on the stream and schedule the new steam for processing..

Parameters
sessionthe session to work in
isthe stream initiating the push
pushthe push to promise
Returns
the new promised stream or NULL

Definition at line 1136 of file h2_session.c.

◆ h2_session_push_enabled()

int h2_session_push_enabled ( h2_session session)

Returns if client settings have push enabled.

Parameters
!=0 iff push is enabled in client settings

Definition at line 1277 of file h2_session.c.

◆ h2_session_set_prio()

apr_status_t h2_session_set_prio ( h2_session session,
struct h2_stream stream,
const struct h2_priority prio 
)

◆ h2_session_state_str()

const char * h2_session_state_str ( h2_session_state  state)

Definition at line 1374 of file h2_session.c.