DeterministicESPAsyncWebServer v6.27.1
Zero-allocation, bounded-execution async HTTP server for ESP32
Loading...
Searching...
No Matches
Route Struct Reference

Internal route entry stored in the routing table. More...

#include <dwserver.h>

Public Attributes

char path [MAX_PATH_LEN]
 Null-terminated path pattern.
 
RouteType type
 HTTP, WS, or SSE.
 
HttpMethod method
 HTTP method (RouteType::ROUTE_HTTP only).
 
Handler callback
 HTTP handler (RouteType::ROUTE_HTTP only).
 
bool is_active
 false for unused table slots.
 
bool is_wildcard
 true when path ends with *.
 
bool is_param
 true when the path contains a :name segment.
 
bool is_regex
 true when the path is a regex (see on_regex()).
 
DetIface iface_filter
 Interface gate; DetIface::DETIFACE_ANY (0) = match any interface.
 

Detailed Description

Internal route entry stored in the routing table.

Populated by DetWebServer::on(), on_ws(), or on_sse(). Application code does not interact with this struct directly.

Definition at line 243 of file dwserver.h.

Member Data Documentation

◆ path

char Route::path[MAX_PATH_LEN]

Null-terminated path pattern.

Definition at line 245 of file dwserver.h.

Referenced by fill_route_base().

◆ type

RouteType Route::type

HTTP, WS, or SSE.

Definition at line 246 of file dwserver.h.

Referenced by DetWebServer::on(), DetWebServer::on(), and DetWebServer::on_regex().

◆ method

HttpMethod Route::method

HTTP method (RouteType::ROUTE_HTTP only).

Definition at line 247 of file dwserver.h.

Referenced by DetWebServer::on(), DetWebServer::on(), and DetWebServer::on_regex().

◆ callback

Handler Route::callback

HTTP handler (RouteType::ROUTE_HTTP only).

Definition at line 248 of file dwserver.h.

Referenced by DetWebServer::on(), DetWebServer::on(), and DetWebServer::on_regex().

◆ is_active

bool Route::is_active

false for unused table slots.

Definition at line 273 of file dwserver.h.

Referenced by fill_route_base().

◆ is_wildcard

bool Route::is_wildcard

true when path ends with *.

Definition at line 274 of file dwserver.h.

Referenced by fill_route_base().

◆ is_param

bool Route::is_param

true when the path contains a :name segment.

Definition at line 275 of file dwserver.h.

Referenced by fill_route_base().

◆ is_regex

bool Route::is_regex

true when the path is a regex (see on_regex()).

Definition at line 276 of file dwserver.h.

Referenced by fill_route_base(), and DetWebServer::on_regex().

◆ iface_filter

DetIface Route::iface_filter

Interface gate; DetIface::DETIFACE_ANY (0) = match any interface.

Definition at line 277 of file dwserver.h.

Referenced by fill_route_base(), and DetWebServer::on().


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