|
Soletta™ Framework
|
HTTP Server handler. More...
#include <getopt.h>#include <stdio.h>#include <string.h>#include <unistd.h>#include <fcntl.h>#include "soletta.h"#include "sol-http.h"#include "sol-http-server.h"#include "sol-util.h"#include "sol-util-file.h"Functions | |
| static bool | on_stdin (void *data, int fd, uint32_t flags) |
| static int | request_cb (void *data, struct sol_http_request *request) |
| static void | shutdown_server (void) |
| SOL_MAIN_DEFAULT (startup_server, shutdown_server) | |
| static void | startup_server (void) |
Variables | |
| static struct sol_http_server * | server |
| static struct sol_fd * | stdin_watch |
| static struct sol_buffer | value |
HTTP Server handler.
Sample server that return a text/plain string. The content of this is read from stdin. To see the usage help, -h or –help.
|
static |
References sol_buffer_get_slice(), sol_quit(), sol_quit_with_code(), SOL_STR_SLICE_PRINT, sol_util_load_file_fd_buffer(), sol_util_strerrora, sol_buffer::used, and value.
Referenced by startup_server().
|
static |
References sol_http_response::api_version, sol_http_response::content, sol_http_response::param, sol_http_params_add(), sol_http_params_clear(), SOL_HTTP_REQUEST_PARAM_HEADER, SOL_HTTP_REQUEST_PARAMS_INIT, SOL_HTTP_RESPONSE_API_VERSION, sol_http_server_send_response(), SOL_HTTP_STATUS_OK, SOL_SET_API_VERSION, and value.
Referenced by startup_server().
|
static |
References server, sol_buffer_fini(), sol_http_server_del(), and value.
| SOL_MAIN_DEFAULT | ( | startup_server | , |
| shutdown_server | |||
| ) |
|
static |
References on_stdin(), port, request_cb(), server, sol_argc(), sol_argv(), sol_buffer_fini(), sol_buffer_get_slice(), sol_buffer_init(), sol_buffer_set_slice(), SOL_HTTP_SERVER_CONFIG_API_VERSION, sol_http_server_new(), sol_http_server_register_handler(), sol_quit_with_code(), SOL_SET_API_VERSION, sol_str_slice_from_str(), SOL_STR_SLICE_PRINT, sol_util_fd_set_flag(), stdin_watch, and value.
|
static |
Referenced by shutdown_server(), and startup_server().
|
static |
Referenced by startup_server().
|
static |
Referenced by create_header_params(), get_int32_packet_and_log(), get_scrolllock_led(), light_method_put(), on_minutes_packet(), on_stdin(), parse_cmdline_pin(), request_cb(), request_input(), response_cb(), shutdown_server(), sol_util_int32_clamp(), and startup_server().
1.8.6