Soletta™ Framework
|
Basic echo server. More...
#include <errno.h>
#include <getopt.h>
#include <limits.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/types.h>
#include "soletta.h"
#include "sol-buffer.h"
#include "sol-socket.h"
#include "sol-network.h"
#include "sol-vector.h"
#include "sol-util.h"
Data Structures | |
struct | queue_item |
Functions | |
static bool | on_can_read (void *data, struct sol_socket *s) |
static bool | on_can_write (void *data, struct sol_socket *s) |
static void | shutdown_server (void) |
SOL_MAIN_DEFAULT (startup_server, shutdown_server) | |
static void | startup_server (void) |
Variables | |
static struct sol_vector | queue |
static struct sol_socket * | sock |
Basic echo server.
Basic echo server. All data received is sent back. To see the usage help, -h or –help.
|
static |
References queue_item::addr, queue_item::buf, queue, sol_buffer_init(), sol_quit_with_code(), sol_socket_recvmsg(), sol_socket_set_write_monitor(), and sol_vector_append().
Referenced by startup_server().
|
static |
References queue_item::addr, queue_item::buf, sol_vector::len, queue, sol_buffer_fini(), sol_socket_sendmsg(), sol_socket_set_write_monitor(), sol_vector_del(), and sol_vector_get().
Referenced by startup_server().
|
static |
References queue_item::buf, queue, sol_buffer_fini(), sol_socket_del(), sol_vector_clear(), and SOL_VECTOR_FOREACH_IDX.
SOL_MAIN_DEFAULT | ( | startup_server | , |
shutdown_server | |||
) |
|
static |
References sol_socket_ip_options::base, on_can_read(), on_can_write(), sol_network_link_addr::port, queue, sol_argc(), sol_argv(), SOL_NETWORK_FAMILY_INET6, sol_quit_with_code(), SOL_SET_API_VERSION, sol_socket_bind(), sol_socket_ip_new(), SOL_SOCKET_OPTIONS_API_VERSION, sol_socket_set_read_monitor(), sol_util_strerrora, and sol_vector_init().
|
static |
Referenced by on_can_read(), on_can_write(), shutdown_server(), and startup_server().
|
static |