ProtoCore v1.0.16
Deterministic, zero-heap network stack for embedded targets
Loading...
Searching...
No Matches
ProtoHandler Struct Reference

Per-protocol connection event/poll callbacks (the server's dispatch vtable). More...

#include <proto_handler.h>

Public Attributes

void(* on_accept )(uint8_t slot)
 EvtType::EVT_CONNECT: a new connection was accepted.
 
void(* on_data )(uint8_t slot)
 EvtType::EVT_DATA: bytes are available in the slot's rx ring.
 
void(* on_close )(uint8_t slot)
 
void(* on_abort )(uint8_t slot)
 
void(* on_poll )(uint8_t slot)
 Called for an active slot each handle() loop (nullable).
 

Detailed Description

Per-protocol connection event/poll callbacks (the server's dispatch vtable).

Definition at line 36 of file proto_handler.h.

Member Data Documentation

◆ on_accept

void(* ProtoHandler::on_accept) (uint8_t slot)

EvtType::EVT_CONNECT: a new connection was accepted.

Definition at line 38 of file proto_handler.h.

◆ on_data

void(* ProtoHandler::on_data) (uint8_t slot)

EvtType::EVT_DATA: bytes are available in the slot's rx ring.

Definition at line 39 of file proto_handler.h.

◆ on_close

void(* ProtoHandler::on_close) (uint8_t slot)

EvtType::EVT_DISCONNECT: the peer closed normally.

Definition at line 40 of file proto_handler.h.

◆ on_abort

void(* ProtoHandler::on_abort) (uint8_t slot)

EvtType::EVT_ERROR: the connection was aborted, not closed. RFC 9293 sec 3.6 MUST-12 - "the local application MUST be informed whether it closed normally or was aborted" - so the two arrive separately. Null falls back to on_close, which cannot tell them apart.

Definition at line 44 of file proto_handler.h.

◆ on_poll

void(* ProtoHandler::on_poll) (uint8_t slot)

Called for an active slot each handle() loop (nullable).

Definition at line 45 of file proto_handler.h.


The documentation for this struct was generated from the following file: