Symbols
loading...
Files
loading...
SummarySyntaxRelatedReferences

Fields

Field
Declared as
Description
Handle to server instance.
int
The type of HTTP request, -1 if unsupported method, HTTP_ANY for wildcard method to support every method.
const char[HTTPD_MAX_URI_LEN + 1]
The URI of this request (1 byte extra for null termination).
size_t
Length of the request body.
void *
Internally used members.
void *
User context pointer passed during URI registration.
void *
Session Context Pointer A session context. Contexts are maintained across 'sessions' for a given open TCP connection. One session could have multiple request responses. The web server will ensure that the context persists across all these request and responses. By default, this is NULL. URI Handlers can set this to any meaningful value. If the underlying socket gets closed, and this pointer is non-NULL, the web server will free up the context by calling free(), unless free_ctx function is set.
Pointer to free context hook Function to free session context If the web server's socket closes, it frees up the session context by calling free() on the sess_ctx member. If you wish to use a custom function for freeing the session context, please specify that here.
bool
Flag indicating if Session Context changes should be ignored By default, if you change the sess_ctx in some URI handler, the http server will internally free the earlier context (if non NULL), after the URI handler returns. If you want to manage the allocation/reallocation/freeing of sess_ctx yourself, set this flag to true, so that the server will not perform any checks on it. The context will be cleared by the server (by calling free_ctx or free()) only if the socket gets closed.

References

from examples