DeterministicESPAsyncWebServer 1.2.0
Zero-allocation, bounded-execution async HTTP server for ESP32
Loading...
Searching...
No Matches
TcpConn Struct Reference

A single TCP connection context. More...

#include <transport.h>

Public Attributes

uint8_t id
 Fixed slot index (0 … MAX_CONNS-1).
 
volatile ConnState state
 Lifecycle state; volatile for inter-task visibility.
 
struct tcp_pcb * pcb
 lwIP PCB; null when slot is free.
 
uint32_t last_activity_ms
 millis() timestamp of last TX/RX event.
 
uint8_t rx_buffer [RX_BUF_SIZE]
 Ring buffer storage.
 
volatile size_t rx_head
 Producer write index (lwIP context).
 
volatile size_t rx_tail
 Consumer read index (main-loop context).
 

Detailed Description

A single TCP connection context.

Sized so that MAX_CONNS instances fit in a static array without fragmentation. All fields except the volatile ring-buffer indices may only be accessed from the Arduino main-loop task.

Definition at line 68 of file transport.h.

Member Data Documentation

◆ id

uint8_t TcpConn::id

Fixed slot index (0 … MAX_CONNS-1).

Definition at line 70 of file transport.h.

Referenced by DeterministicAsyncTCP::init().

◆ state

volatile ConnState TcpConn::state

◆ pcb

struct tcp_pcb* TcpConn::pcb

◆ last_activity_ms

uint32_t TcpConn::last_activity_ms

millis() timestamp of last TX/RX event.

Definition at line 73 of file transport.h.

Referenced by DeterministicAsyncTCP::check_timeouts().

◆ rx_buffer

uint8_t TcpConn::rx_buffer[RX_BUF_SIZE]

Ring buffer storage.

Definition at line 75 of file transport.h.

Referenced by http_parse(), and ws_parse().

◆ rx_head

volatile size_t TcpConn::rx_head

Producer write index (lwIP context).

Definition at line 76 of file transport.h.

Referenced by http_parse(), and ws_parse().

◆ rx_tail

volatile size_t TcpConn::rx_tail

Consumer read index (main-loop context).

Definition at line 77 of file transport.h.

Referenced by http_parse(), and ws_parse().


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