|
DeterministicESPAsyncWebServer v6.27.1
Zero-allocation, bounded-execution async HTTP server for ESP32
|
A single TCP connection context. More...
#include <tcp.h>
Public Attributes | |
| uint8_t | id |
| Fixed slot index (0 … MAX_CONNS-1). | |
| DetAtomic< ConnState > | state |
| Lifecycle state; acquire/release 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. | |
| DetAtomic< size_t > | rx_head |
| Producer write index (lwIP/tcpip context). | |
| DetAtomic< size_t > | rx_tail |
| Consumer read index (worker context). | |
| size_t | rx_acked |
| 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. | |
| ConnProto | 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. | |
| DetIface | 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 volatile ring-buffer indices may only be accessed from the Arduino main-loop task.
| uint8_t TcpConn::id |
Fixed slot index (0 … MAX_CONNS-1).
Definition at line 73 of file tcp.h.
Referenced by lowlevel_err_cb(), lowlevel_recv_cb(), lowlevel_sent_cb(), DeterministicAsyncTCP::pool_init(), ssh_conn_accept(), ssh_conn_close_channel(), ssh_conn_open_forwarded(), and ssh_conn_send().
Lifecycle state; acquire/release for inter-task visibility.
Definition at line 74 of file tcp.h.
Referenced by DeterministicAsyncTCP::check_timeouts(), det_conn_abort_slot(), det_conn_ack_consumed(), det_conn_begin_close(), det_conn_close(), det_conn_remote_addr(), det_conn_remote_ip(), det_conn_touch_active(), lowlevel_err_cb(), lowlevel_recv_cb(), lowlevel_sent_cb(), DeterministicAsyncTCP::pool_init(), DetWebServer::redirect(), DetWebServer::send(), DetWebServer::send_empty(), and DeterministicAsyncTCP::stop().
| struct tcp_pcb* TcpConn::pcb |
lwIP PCB; null when slot is free.
Definition at line 75 of file tcp.h.
Referenced by DeterministicAsyncTCP::check_timeouts(), det_conn_abort_slot(), det_conn_ack_consumed(), det_conn_begin_close(), det_conn_close(), det_conn_remote_addr(), det_conn_remote_ip(), det_conn_sndbuf(), lowlevel_err_cb(), lowlevel_recv_cb(), DetWebServer::redirect(), DetWebServer::send(), DetWebServer::send_empty(), and DeterministicAsyncTCP::stop().
| uint32_t TcpConn::last_activity_ms |
millis() timestamp of last TX/RX event.
Definition at line 76 of file tcp.h.
Referenced by DeterministicAsyncTCP::check_timeouts(), det_conn_begin_close(), det_conn_touch_active(), lowlevel_recv_cb(), and lowlevel_sent_cb().
| uint8_t TcpConn::rx_buffer[RX_BUF_SIZE] |
| DetAtomic<size_t> TcpConn::rx_head |
Producer write index (lwIP/tcpip context).
Definition at line 79 of file tcp.h.
Referenced by lowlevel_recv_cb().
| DetAtomic<size_t> TcpConn::rx_tail |
Consumer read index (worker context).
Definition at line 80 of file tcp.h.
Referenced by det_conn_ack_consumed(), and lowlevel_recv_cb().
| size_t TcpConn::rx_acked |
rx_tail position last ACKed to lwIP (tcp_recved). Worker-only: the window is reopened by exactly the bytes drained since, so it tracks ring occupancy (ack-on-consume) rather than copy.
Definition at line 81 of file tcp.h.
Referenced by det_conn_ack_consumed().
| uint8_t TcpConn::listener_id |
| uint8_t TcpConn::owner |
Worker that owns this slot (round-robin at accept). Always 0 at N=1.
Definition at line 86 of file tcp.h.
Referenced by DeterministicAsyncTCP::check_timeouts(), listener_enqueue(), and lowlevel_sent_cb().
| ConnProto TcpConn::proto |
| uint8_t TcpConn::proto_slot |
Per-protocol session/pool index (0xFF = none): the SSH session, an MQTT/Modbus session, etc.
Definition at line 89 of file tcp.h.
Referenced by ssh_conn_accept(), ssh_conn_close(), ssh_conn_poll(), and ssh_conn_rx().
| DetIface TcpConn::iface |
| uint8_t TcpConn::tls |
Non-zero when this connection is TLS (set at accept time).
Definition at line 91 of file tcp.h.
Referenced by det_conn_abort_slot(), and det_conn_close().