|
Zephyr Project API 4.0.0
A Scalable Open Source RTOS
|
HTTP server API. More...
#include <stdint.h>#include <zephyr/kernel.h>#include <zephyr/net/http/parser.h>#include <zephyr/net/http/hpack.h>#include <zephyr/net/http/status.h>#include <zephyr/net/socket.h>#include <zephyr/sys/iterable_sections.h>Go to the source code of this file.
Data Structures | |
| struct | http_resource_detail |
| Representation of a server resource, common for all resource types. More... | |
| struct | http_resource_detail_static |
| Representation of a static server resource. More... | |
| struct | http_resource_detail_static_fs |
| Representation of a static filesystem server resource. More... | |
| struct | http_content_type |
| struct | http_header |
| HTTP header representation. More... | |
| struct | http_response_ctx |
| HTTP response context. More... | |
| struct | http_resource_detail_dynamic |
| Representation of a dynamic server resource. More... | |
| struct | http_resource_detail_websocket |
| Representation of a websocket server resource. More... | |
| struct | http2_stream_ctx |
| HTTP/2 stream representation. More... | |
| struct | http2_frame |
| HTTP/2 frame representation. More... | |
| struct | http_client_ctx |
| Representation of an HTTP client connected to the server. More... | |
Macros | |
| #define | HTTP_SERVER_CONTENT_TYPE(_extension, _content_type) |
| #define | HTTP_SERVER_CONTENT_TYPE_FOREACH(_it) STRUCT_SECTION_FOREACH(http_content_type, _it) |
Typedefs | |
| typedef int(* | http_resource_dynamic_cb_t) (struct http_client_ctx *client, enum http_data_status status, uint8_t *data_buffer, size_t data_len, struct http_response_ctx *response_ctx, void *user_data) |
| Callback used when data is received. | |
| typedef int(* | http_resource_websocket_cb_t) (int ws_socket, void *user_data) |
| Callback used when a Websocket connection is setup. | |
Enumerations | |
| enum | http_resource_type { HTTP_RESOURCE_TYPE_STATIC , HTTP_RESOURCE_TYPE_STATIC_FS , HTTP_RESOURCE_TYPE_DYNAMIC , HTTP_RESOURCE_TYPE_WEBSOCKET } |
| HTTP server resource type. More... | |
| enum | http_data_status { HTTP_SERVER_DATA_ABORTED = -1 , HTTP_SERVER_DATA_MORE = 0 , HTTP_SERVER_DATA_FINAL = 1 } |
| Indicates the status of the currently processed piece of data. More... | |
Functions | |
| int | http_server_start (void) |
| Start the HTTP2 server. | |
| int | http_server_stop (void) |
| Stop the HTTP2 server. | |
HTTP server API.