|
ProtoCore v1.0.16
Deterministic, zero-heap network stack for embedded targets
|
Core server - per-protocol connection handler dispatch table. More...
#include "protocore_config.h"Go to the source code of this file.
Classes | |
| struct | ProtoHandler |
| Per-protocol connection event/poll callbacks (the server's dispatch vtable). More... | |
Typedefs | |
| typedef PROTOCORE_BEGIN_DECLS struct ProtoHandler | ProtoHandler |
| Per-protocol connection event/poll callbacks (the server's dispatch vtable). | |
Functions | |
| void | protocore_register_builtins (void) |
| Install every handler the build compiled in. Defined in server/protocore_builtins.c, the policy list: this layer owns the mechanism and names no protocol. | |
Core server - per-protocol connection handler dispatch table.
Every application protocol (HTTP, Telnet, SSH, and optional services such as MQTT or Modbus) implements one ProtoHandler and registers it with the session layer, which owns the registry and the storage behind it: the server tick (server_tick) routes each connection event - and the main loop (handle()) polls each active slot - through ::Protocols by ProtoConn, so a new protocol plugs in by registering a handler instead of editing the dispatchers.
This file declares the callback record and nothing else. Registering a handler means opening, closing and tracking the lifetime of a connection, which is the session layer's job and not the server's - so ::Protocols is published by network_drivers/session/session.h, beside the SessionCtx field it writes.
All callbacks are nullable, run on the main-loop task, and take the affected connection slot index. The built-in HTTP/Telnet/SSH handlers are registered lazily on first lookup, so dispatch works even before begin() (the native test harness drives server_tick() directly).
Definition in file proto_handler.h.
| typedef PROTOCORE_BEGIN_DECLS struct ProtoHandler ProtoHandler |
Per-protocol connection event/poll callbacks (the server's dispatch vtable).
| void protocore_register_builtins | ( | void | ) |
Install every handler the build compiled in. Defined in server/protocore_builtins.c, the policy list: this layer owns the mechanism and names no protocol.