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
Functions | Variables
echo-client.c File Reference

Basic echo client. 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"

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_client (void)
 
 SOL_MAIN_DEFAULT (startup_client, shutdown_client)
 
static void startup_client (void)
 

Variables

static struct sol_network_link_addr address
 
static struct sol_socketsock
 

Detailed Description

Basic echo client.

This is echo client, the value given to the program is sent to the echo server and the response is printed out. 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_client ( void  )
static
SOL_MAIN_DEFAULT ( startup_client  ,
shutdown_client   
)
static void startup_client ( void  )
static

Variable Documentation

struct sol_network_link_addr address
static
Initial value:
= {
.port = 7,
}
IPv6 family.
Definition: sol-network.h:120
Examples:
/src/samples/network/echo-client.c.
struct sol_socket* sock
static