|
ProtoCore v1.0.16
Deterministic, zero-heap network stack for embedded targets
|
A single TCP connection context. More...
#include <common.h>
Public Member Functions | |
| EMBED_ALIGN (MMGR_ALIGN_BYTES) uint8_t rx_buffer[RX_BUF_SIZE] | |
| The ring's bytes, owned here. | |
Public Attributes | |
| uint8_t | id |
| Fixed slot index (0 … MAX_CONNS-1). | |
| _Atomic ConnState | state |
| Lifecycle state; acquire/release for inter-task visibility. | |
| protocore_pcb * | pcb |
| Stack control block; null when slot is free. | |
| uint32_t | last_activity_ms |
protocore_millis() timestamp of last TX/RX event. | |
| mmgr_ring | rx |
| The receive ring over rx_buffer. | |
| size_t | rx_unacked |
| uint8_t | listener_id |
| Index into listener_pool[]; set at accept time. | |
| uint8_t | owner |
| Worker that owns this slot (round-robin at accept). Always 0 at N=1. | |
| ProtoConn | proto |
| Application protocol for this connection. | |
| uint8_t | proto_slot |
| Per-protocol session/pool index (0xFF = none): the SSH session, an MQTT/Modbus session, etc. | |
| protocore_if_kind | iface |
| Interface this connection arrived on; set at accept time. | |
| uint8_t | tls |
| Non-zero when this connection is TLS (set at accept time). | |
A single TCP connection context.
Sized so that MAX_CONNS instances fit in a static array without fragmentation. All fields except the ring and the state may only be accessed from the main-loop task.
| TcpConn::EMBED_ALIGN | ( | MMGR_ALIGN_BYTES | ) |
The ring's bytes, owned here.
| protocore_pcb* TcpConn::pcb |
| uint32_t TcpConn::last_activity_ms |
protocore_millis() timestamp of last TX/RX event.
| size_t TcpConn::rx_unacked |
| uint8_t TcpConn::listener_id |
| uint8_t TcpConn::owner |
| ProtoConn TcpConn::proto |
| uint8_t TcpConn::proto_slot |
| protocore_if_kind TcpConn::iface |
| uint8_t TcpConn::tls |