struct SessionContext
C++
struct SessionContext
One client connection as seen by a servant: who is calling, and the
state that lives as long as the connection. Get the current one with
get_context() inside a servant method.
include/nprpc/session_context.h:64
Fields
CallContext call
The call being dispatched; runtime use. See get_call_context().
include/nprpc/session_context.h:94
std::string_view cookies
HTTP-only: value of the incoming Cookie: header (valid during dispatch). Empty for all non-HTTP transports (TCP/WS/SHM).
include/nprpc/session_context.h:84
bool quic_client_authenticated = false
True only for an inbound native QUIC session whose client certificate passed the listener's trust policy. Transport code sets this, not RPC input.
include/nprpc/session_context.h:69
ReferenceList ref_list
Servants this client holds references to.
include/nprpc/session_context.h:71
EndPoint remote_endpoint
The client's address and transport.
include/nprpc/session_context.h:66
flat_buffer *rx_buffer = nullptr
The request being dispatched and the reply being built; runtime use.
include/nprpc/session_context.h:77
impl::Session *session = nullptr
The session this is the context of; runtime use.
include/nprpc/session_context.h:92
std::vector<std::string> set_cookies
HTTP-only: Set-Cookie header values to attach to the HTTP response.
Servants append to this via nprpc::http::set_cookie().
Ignored for all non-HTTP transports.
include/nprpc/session_context.h:89
impl::SharedMemoryChannel *shm_channel = nullptr
For server-side shared memory sessions, points to the channel for zero-copy responses; nullptr for all other session types (TCP, WebSocket, client-side, etc.)
include/nprpc/session_context.h:75
impl::StreamManager *stream_manager = nullptr
Streams open on this session; runtime use.
include/nprpc/session_context.h:80
flat_buffer *tx_buffer = nullptr
The request being dispatched and the reply being built; runtime use.
include/nprpc/session_context.h:77