HTTP protocol library prototypes. More...
Data Structures | |
struct | httpserv_type |
Used for information about current connection. More... | |
struct | http_con_type |
HTTP connection structure. More... | |
struct | ws_socket_type |
Websocket structure. More... | |
Macros | |
#define | NULLCHAR '\0' |
#define | CR '\r' |
#define | LF '\n' |
#define | SP ' ' |
#define | HTTP_PORT 80 |
#define | TCP_MAX_LEN 1460 |
#define | HTTP_NO_LIMIT _MAKE_32(0) |
#define | WS_FRAME_CONTINUATION 0 |
#define | WS_FRAME_TEXT 1 |
#define | WS_FRAME_BINARY 2 |
#define | WS_CLOSE 8 |
#define | WS_PING 9 |
#define | WS_PONG 10 |
#define | WS_CONNECTED 128 |
#define | WS_PROTOCOL_SIZE 14 |
http_interpreter() return value | |
#define | _HTTP_KEEP_ALIVE |
#define | _HTTP_CLOSE_CONNECTION |
HTTP Command Table | |
#define | _HTTP_GET |
#define | _HTTP_HEAD |
#define | _HTTP_POST |
#define | _HTTP_WS |
#define | _HTTP_UNKNOWN |
HTTP state machine | |
#define | _HTTP_LISTENING 0 |
#define | _HTTP_ESTABLISHED 1 |
HTTP limits | |
#define | HTTP_MAX_ARG 100 |
#define | HTTP_LINE_LENGTH 500 |
Functions | |
int32_t | http_server_init (user_type *user, mmc_function_type *(*d8900_init_mmc)(void), int32_t max_connections) |
Initialize HTTP server. More... | |
void | http_define_callback (int32_t(*callback_func)(httpserv_type *)) |
Define a user callback function for HTTP requests. More... | |
int32_t | http_interpreter (httpserv_type *http_server) |
User defined callback function. More... | |
void | websocket_define_callback (int32_t(*callback_func)(ws_socket_type *)) |
Define a user callback function for websocket requests. More... | |
void | http_set_authentication (char *auth_name, char *auth_key, direntry_type *err401, direntry_type *dir_list,...) |
Initialize a secure web page. More... | |
int32_t | http_get_uri (httpserv_type *http_server) |
Search user defined Uniform Resource Identifiers (URI) list for requested uri. More... | |
int32_t | http_send_user_page (httpserv_type *http_info, user_type *puser, int32_t uri) |
Send user defined webpage. More... | |
int32_t | http_send_uri (httpserv_type *http_server, direntry_type *uri) |
Send URI using the specified URI without looking up in user list. More... | |
http_con_type * | http_set_up_page (httpserv_type *http_info, user_type *puser, int32_t uri) |
set up a page for later transmission More... | |
int32_t | http_send_page (http_con_type *con) |
start page transmission More... | |
int32_t | http_server (void) |
The main polling function for concurrent HTTP server. More... | |
void | http_set_index_page (uint32_t page) |
Define index page. More... | |
int32_t | http_add_page (direntry_type *uri) |
Dynamically add a webpage during runtime. More... | |
int32_t | http_send_websocket (ws_socket_type *ws, char *buffer, uint32_t length) |
send a message over connected websocket More... | |
_ _ _ __| | ___(_) ____ _ __ | |_ / _` | / __| |/ _` | '_ \| __| | (_| | _ \__ \ | (_| | | | | |_ \__,_|(_) ___/_|\__, |_| |_|\__| Signalprocessing |___/ Technology
#define WS_FRAME_CONTINUATION 0 |
operation code frame continuation
#define WS_FRAME_TEXT 1 |
operation code text frame
#define WS_FRAME_BINARY 2 |
operation code binary frame
#define WS_CLOSE 8 |
operation code close connection
#define WS_PING 9 |
operation code ping
#define WS_PONG 10 |
operation code pong
#define WS_CONNECTED 128 |
operation code connected, internal use only