DeterministicESPAsyncWebServer 1.2.0
Zero-allocation, bounded-execution async HTTP server for ESP32
Loading...
Searching...
No Matches
transport.cpp File Reference

Layer 4 (Transport) — TCP connection management implementation. More...

#include "transport.h"
#include "freertos/FreeRTOS.h"
#include "freertos/queue.h"
#include "lwip/tcp.h"

Go to the source code of this file.

Variables

TcpConn conn_pool [MAX_CONNS]
 Static pool of connection contexts. Defined in transport.cpp.
 

Detailed Description

Layer 4 (Transport) — TCP connection management implementation.

All lwIP raw-API callbacks run in the tcpip_thread FreeRTOS task context. They are NOT hardware ISRs, which is why we use xQueueSend() (non-ISR variant) with timeout=0 rather than xQueueSendFromISR().

Ring buffer write ordering The producer (recv callback) writes payload bytes into rx_buffer[] and then advances rx_head. The consumer (main loop) reads from rx_buffer[] at rx_tail and advances rx_tail. Because Xtensa LX7 stores are in-order and rx_head/rx_tail are volatile, no memory barriers are needed beyond the volatile annotation.

Definition in file transport.cpp.

Variable Documentation

◆ conn_pool