A single TCP connection context.
More...
#include <common.h>
|
| uint8_t | id |
| | Fixed slot index (0 … MAX_CONNS-1).
|
| embed_atomic_u32 | 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.
Definition at line 58 of file common.h.
◆ EMBED_ALIGN()
| TcpConn::EMBED_ALIGN |
( |
MMGR_ALIGN_BYTES | | ) |
|
◆ id
Fixed slot index (0 … MAX_CONNS-1).
Definition at line 60 of file common.h.
◆ state
| embed_atomic_u32 TcpConn::state |
Lifecycle state; acquire/release for inter-task visibility.
Definition at line 61 of file common.h.
◆ pcb
Stack control block; null when slot is free.
Definition at line 62 of file common.h.
◆ last_activity_ms
| uint32_t TcpConn::last_activity_ms |
protocore_millis() timestamp of last TX/RX event.
Definition at line 63 of file common.h.
◆ rx
The receive ring over rx_buffer.
Definition at line 66 of file common.h.
◆ rx_unacked
| size_t TcpConn::rx_unacked |
Bytes drained since the last ACK to the stack. Worker-only: the window is reopened by exactly these, so it tracks ring occupancy (ack-on-consume) rather than copy.
Definition at line 67 of file common.h.
◆ listener_id
| uint8_t TcpConn::listener_id |
Index into listener_pool[]; set at accept time.
Definition at line 71 of file common.h.
◆ owner
Worker that owns this slot (round-robin at accept). Always 0 at N=1.
Definition at line 72 of file common.h.
◆ proto
Application protocol for this connection.
Definition at line 73 of file common.h.
◆ proto_slot
| uint8_t TcpConn::proto_slot |
Per-protocol session/pool index (0xFF = none): the SSH session, an MQTT/Modbus session, etc.
Definition at line 75 of file common.h.
◆ iface
| protocore_if_kind TcpConn::iface |
Interface this connection arrived on; set at accept time.
Definition at line 76 of file common.h.
◆ tls
Non-zero when this connection is TLS (set at accept time).
Definition at line 77 of file common.h.
The documentation for this struct was generated from the following file:
- src/network_drivers/transport/tcp/common/common.h