Embedded TCP/IP stack
4.7.0
|
The current version of the FNET HTTP Server supports:
After the FNET HTTP server is initialized by calling the fnet_http_srv_init() function, the user application should call the main service polling function fnet_service_poll() periodically in background.
For HTTP server usage example, refer to FNET demo application source code.
Configuration parameters:
Data Structures | |
struct | fnet_http_srv_tls_params_t |
HTTP over TLS (HTTPS) input parameters for fnet_http_srv_init(). More... | |
struct | fnet_http_srv_params_t |
Input parameters for fnet_http_srv_init(). More... | |
struct | fnet_http_srv_auth_t |
HTTP Authentication table. More... | |
struct | fnet_http_srv_cgi_t |
CGI callback function table. More... | |
struct | fnet_http_srv_post_t |
POST-method callback function table. More... | |
struct | fnet_http_srv_ssi_t |
SSI callback function table. More... | |
Macros | |
#define | FNET_HTTP_SRV_VERSION_MAJOR |
The major version number of HTTP protocol supported by the HTTP server. More... | |
#define | FNET_HTTP_SRV_VERSION_MINOR |
The minor version number of HTTP protocol supported by the HTTP server. More... | |
#define | FNET_HTTP_SRV_CGI_EXTENSION "cgi" |
CGI file extension. All HTTP requests to the files that have this extension will be handled by the CGI handler. . More... | |
#define | FNET_HTTP_SRV_SSI_EXTENSION "shtml" |
SSI file extension. All files that have this extension will be parsed by the SSI parser. . More... | |
Typedefs | |
typedef fnet_int32_t | fnet_http_srv_desc_t |
HTTP server descriptor. More... | |
typedef fnet_int32_t | fnet_http_srv_session_t |
HTTP session handle. More... | |
typedef fnet_return_t(* | fnet_http_srv_cgi_handle_t) (fnet_http_srv_session_t session, fnet_char_t *query, fnet_uint32_t *cookie) |
Callback function prototype of the CGI query handler. More... | |
typedef fnet_size_t(* | fnet_http_srv_cgi_send_t) (fnet_uint8_t *buffer, fnet_size_t buffer_size, fnet_bool_t *eof, fnet_uint32_t *cookie) |
Callback function prototype of the CGI response function. More... | |
typedef fnet_return_t(* | fnet_http_srv_post_handle_t) (fnet_http_srv_session_t session, fnet_char_t *query, fnet_uint32_t *cookie) |
Callback function prototype of the POST-method query handler. More... | |
typedef fnet_return_t(* | fnet_http_srv_post_receive_t) (fnet_http_srv_session_t session, fnet_uint8_t *buffer, fnet_size_t buffer_size, fnet_uint32_t *cookie) |
Callback function prototype of the POST-method receive function. More... | |
typedef fnet_size_t(* | fnet_http_srv_post_send_t) (fnet_uint8_t *buffer, fnet_size_t buffer_size, fnet_bool_t *eof, fnet_uint32_t *cookie) |
Callback function prototype of the POST-method response function. More... | |
typedef fnet_return_t(* | fnet_http_srv_ssi_handle_t) (fnet_char_t *query, fnet_uint32_t *cookie) |
Callback function prototype of the SSI parameters handler. More... | |
typedef fnet_size_t(* | fnet_http_srv_ssi_send_t) (fnet_uint8_t *buffer, fnet_size_t buffer_size, fnet_bool_t *eof, fnet_uint32_t *cookie) |
Callback function prototype of the SSI include function. More... | |
Functions | |
fnet_http_srv_desc_t | fnet_http_srv_init (fnet_http_srv_params_t *params) |
Initializes the HTTP Server service. More... | |
void | fnet_http_srv_release (fnet_http_srv_desc_t desc) |
Releases the HTTP Server service. More... | |
fnet_bool_t | fnet_http_srv_is_enabled (fnet_http_srv_desc_t desc) |
Detects if the HTTP Server service is enabled or disabled. More... | |
void | fnet_http_srv_query_unencode (fnet_uint8_t *dest, fnet_uint8_t *src) |
Converts escaped string to an original format. More... | |
void | fnet_http_srv_set_response_status_code (fnet_http_srv_session_t session, fnet_http_srv_status_code_t status_code) |
Sets status code in HTTP response status-line. More... | |
void | fnet_http_srv_set_response_content_length (fnet_http_srv_session_t session, fnet_size_t content_length) |
Sets content length in HTTP response header. More... | |
void | fnet_http_srv_set_response_no_header (fnet_http_srv_session_t session) |
Disables sending of HTTP response status-code and header. More... | |