Template Struct context

Inheritance Relationships

Base Type

Struct Documentation

template<typename AuxT, typename RequestT, typename ShadowT>
struct udho::context : public udho::detail::context_common<AuxT, RequestT>

A Stateful context passed to all callables along with the arguments. The context is always the first argument to the callable. Even if the callable takes no arguments, it must take the context as the first argument. A stateful context should be used in callables that need to use session states.

Note

instead of instantiating this template directly use udho::contexts::stateful

Template Parameters
  • AuxT: bridge between the server and the callable

  • RequestT: HTTP request type

  • ShadowT: the session data structure

Public Types

typedef detail::context_common<AuxT, RequestT> base_type
typedef RequestT request_type
typedef ShadowT shadow_type
typedef shadow_type::key_type key_type
typedef context<AuxT, request_type, shadow_type> self_type
typedef udho::session_<request_type, shadow_type> session_type

Public Functions

template<typename ...V>
context(AuxT &aux, const RequestT &request, udho::cache::shadow<key_type, V...> &shadow)
template<typename OtherShadowT>
context(context<AuxT, RequestT, OtherShadowT> &other)
session_type &session()

access the HTTP Session

See

udho::session_

Public Members

session_type _session