ProtoCore v1.0.16
Deterministic, zero-heap network stack for embedded targets
Loading...
Searching...
No Matches
HttpRoute Struct Reference

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

#include <http_route.h>

Public Attributes

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

Detailed Description

Internal route entry stored in the routing table.

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

Definition at line 55 of file http_route.h.

Member Data Documentation

◆ path

char HttpRoute::path[MAX_PATH_LEN]

Null-terminated path pattern.

Definition at line 57 of file http_route.h.

◆ type

HttpRouteType HttpRoute::type

HTTP, WS, or SSE.

Definition at line 58 of file http_route.h.

◆ method

HttpMethod HttpRoute::method

HTTP method (ROUTE_HTTP only).

Definition at line 59 of file http_route.h.

◆ callback

Handler HttpRoute::callback

HTTP handler (ROUTE_HTTP only).

Definition at line 60 of file http_route.h.

◆ is_active

proto_bool HttpRoute::is_active

false for unused table slots.

Definition at line 88 of file http_route.h.

◆ is_wildcard

proto_bool HttpRoute::is_wildcard

true when path ends with *.

Definition at line 89 of file http_route.h.

◆ is_param

proto_bool HttpRoute::is_param

true when the path contains a :name segment.

Definition at line 90 of file http_route.h.

◆ is_regex

proto_bool HttpRoute::is_regex

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

Definition at line 91 of file http_route.h.

◆ iface_filter

protocore_if_kind HttpRoute::iface_filter

Interface gate; PROTOCORE_IF_ANY (0) = match any interface.

Definition at line 92 of file http_route.h.


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