TI's CC3100 websocket camera demo with Arducam mini ov5642 and freertos. Should work with other M3's. Work in progress test demo.

Dependencies:   mbed

Embed: (wiki syntax)

« Back to documentation index

Static request handler module

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:
uConnectionThe number of the connection. This value is guaranteed to satisfy: 0 <= uConnection < HTTP_CORE_MAX_CONNECTIONS
resourceThe 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 62 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:
requestPointer to all data available about the request
Returns:
nonzero if request was handled. zero if not.

Definition at line 92 of file HttpStatic.cpp.