|
ProtoCore v1.0.16
Deterministic, zero-heap network stack for embedded targets
|
Layer 4 (Transport), connection oriented: the three sides of TCP, joined. More...
#include "protocore_config.h"Go to the source code of this file.
Layer 4 (Transport), connection oriented: the three sides of TCP, joined.
One module with three halves, because a connection is reached three ways. The listener binds a port and accepts on it, the pool holds what was accepted, and the client dials out. All three speak to the same stack and hand out slot indices and rings, so no stack type reaches a layer above this one.
Each half is reached through its own handle: ::ConnPool, ::TcpListener, ::TcpClient. The halves are pointers rather than values because a table in one translation unit is not a constant expression in another, so a by-value member could not be initialized from here.
The per-slot ring accessors stay inline in common.h rather than becoming members. A member is an indirect call through rodata; those accessors are a load and a compare on the request path.
Definition in file tcp.h.