Port of TI's CC3100 Websock camera demo. Using FreeRTOS, mbedTLS, also parts of Arducam for cams ov5642 and 0v2640. Can also use MT9D111. Work in progress. Be warned some parts maybe a bit flacky. This is for Seeed Arch max only, for an M3, see the demo for CM3 using the 0v5642 aducam mini.
Static request handler module
This module implements static content processing for HTTP requests. More...
Functions | |
int | HttpStatic_InitRequest (UINT16 uConnection, struct HttpBlob resource) |
Initialize HttpStatic module state for a new request, and identify the request This function examines the specified resource string, and looks it up in the Flash Database. | |
int | HttpStatic_ProcessRequest (struct HttpRequest *request) |
Process a static-content HTTP request This function is called after a request was already initialized, and a Flash content entry was identified during a call to HttpStatic_InitRequest() This function calls HttpResponse_*() to send the content data to the browser. |
Detailed Description
This module implements static content processing for HTTP requests.
All requests are handled by looking up the URL's resource in the flash database, and returning the content in the response. Note this module is only compiled if HTTP_CORE_ENABLE_STATIC is defined in HttpConfig.h
Function Documentation
int HttpStatic_InitRequest | ( | UINT16 | uConnection, |
struct HttpBlob | resource | ||
) |
Initialize HttpStatic module state for a new request, and identify the request This function examines the specified resource string, and looks it up in the Flash Database.
If found, it commits to process this request by returning nonzero. Otherwise it returns zero.
- Parameters:
-
uConnection The number of the connection. This value is guaranteed to satisfy: 0 <= uConnection < HTTP_CORE_MAX_CONNECTIONS resource The resource part of the URL, as specified by the browser in the request, including any query string (and hash). Note: The resource string exists ONLY during the call to this function. The string pointer should not be copied by this function.
- Returns:
- nonzero if request is to be handled by this module. zero if not.
Definition at line 63 of file HttpStatic.cpp.
int HttpStatic_ProcessRequest | ( | struct HttpRequest * | request ) |
Process a static-content HTTP request This function is called after a request was already initialized, and a Flash content entry was identified during a call to HttpStatic_InitRequest() This function calls HttpResponse_*() to send the content data to the browser.
- Parameters:
-
request Pointer to all data available about the request
- Returns:
- nonzero if request was handled. zero if not.
Definition at line 93 of file HttpStatic.cpp.
Generated on Tue Jul 12 2022 22:22:39 by 1.7.2