Layer 5 (Session) - where a connection is opened, closed and controlled. More...
#include "network_drivers/transport/tcp/evt/evt.h"#include "server/core/proto_handler/proto_handler.h"#include "server/core/worker/worker.h"#include "protocore_config.h"Go to the source code of this file.
Classes | |
| struct | ProtocolsVars |
| struct | ProtoRegistryNs |
| The entries. More... | |
| struct | SessionVars |
| struct | SessionNs |
| The entries. More... | |
Typedefs | |
| typedef embed_bool(* | protocore_resp_sink_fn) (uint8_t slot, int code, const char *content_type, const char *body, size_t len) |
Functions | |
| void | protocore_protocols_register_builtins (const uint8_t *work) |
| void | protocore_protocols_add (uint8_t *work) |
| void | protocore_protocols_get (uint8_t *work) |
| void | protocore_session_tick (const uint8_t *work) |
| uint8_t * | protocore_session_span (void) |
| The PROTOCORE_SESSION_BORROW bytes this module's state lives in. | |
Variables | |
| ProtocolsVars | ProtocolsV |
| The operands and the outcome. | |
| uint32_t | http_req_start_ms [CONN_POOL_SLOTS] |
| protocore_resp_sink_fn | http_resp_sink [CONN_POOL_SLOTS] |
| SessionVars | SessionV |
| The operands and the outcome. | |
Layer 5 (Session) - where a connection is opened, closed and controlled.
A connection's life is decided here: the transport signals that one arrived, ended or faulted, and this layer turns that into an open, a close, or a dispatch to whichever protocol owns the slot. It sits above the server core and uses it rather than being part of it - the worker pool turns the crank (server/core/worker.h) and the protocol registry says who receives the event (server/core/proto_handler.h).
One tick drains every pending event in a single bounded loop, so the worst case is O(queue_depth + MAX_CONNS) rather than unbounded in the arrival rate.
Definition in file session.h.
| typedef embed_bool(* protocore_resp_sink_fn) (uint8_t slot, int code, const char *content_type, const char *body, size_t len) |
| void protocore_protocols_register_builtins | ( | const uint8_t * | work | ) |
Referenced by protocore_protocols_get().
| void protocore_protocols_add | ( | uint8_t * | work | ) |
Referenced by protocore_protocols_get().
| void protocore_protocols_get | ( | uint8_t * | work | ) |
References protocore_protocols_add(), protocore_protocols_get(), and protocore_protocols_register_builtins().
Referenced by protocore_protocols_get().
| void protocore_session_tick | ( | const uint8_t * | work | ) |
References protocore_session_tick().
Referenced by protocore_session_tick().
| uint8_t * protocore_session_span | ( | void | ) |
The PROTOCORE_SESSION_BORROW bytes this module's state lives in.
Stated beside the namespace rather than on it: an entry takes a borrow, and this is where that borrow comes from. Taken once from the end of the pool, which no mark and no release walks, so the state lasts the life of the program.
|
extern |
The operands and the outcome.
|
extern |
|
extern |
|
extern |
The operands and the outcome.