Soletta™ Framework
Framework for making IoT devices

Full online documentation | C API Index
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Functions | Variables
echo-server.c File Reference

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_socketsock
 

Detailed Description

Basic echo server.

Basic echo server. All data received is sent back. To see the usage help, -h or –help.

Function Documentation

static bool on_can_read ( void *  data,
struct sol_socket s 
)
static
static bool on_can_write ( void *  data,
struct sol_socket s 
)
static
static void shutdown_server ( void  )
static
SOL_MAIN_DEFAULT ( startup_server  ,
shutdown_server   
)
static void startup_server ( void  )
static

Variable Documentation

struct sol_vector queue
static
struct sol_socket* sock
static