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 Fields
sol_socket_options Struct Reference

Defines the behaviour of a socket instance. More...

#include <sol-socket.h>

Data Fields

uint16_t api_version
 must match SOL_SOCKET_OPTIONS_API_VERSION at runtime. More...
 
const void * data
 User data data will be given in on_can_read() and on_can_write() More...
 
bool(* on_can_read )(void *data, struct sol_socket *s)
 Register a function to be called when the socket has data to be read. More...
 
bool(* on_can_write )(void *data, struct sol_socket *s)
 Register a function to be called when the socket is ready to be written. More...
 
uint16_t sub_api
 To version each subclass. More...
 

Detailed Description

Defines the behaviour of a socket instance.

Field Documentation

uint16_t sol_socket_options::api_version

must match SOL_SOCKET_OPTIONS_API_VERSION at runtime.

const void* sol_socket_options::data

User data data will be given in on_can_read() and on_can_write()

Examples:
/src/samples/network/echo-client.c.

Referenced by startup_client().

bool(* sol_socket_options::on_can_read)(void *data, struct sol_socket *s)

Register a function to be called when the socket has data to be read.

  • data the user's data given in this options.
  • s the socket that has data to be read.
  • returns true to keep being called, false otherwise.
bool(* sol_socket_options::on_can_write)(void *data, struct sol_socket *s)

Register a function to be called when the socket is ready to be written.

  • data the user's data given in this options.
  • s the socket that is able to be written.
  • returns true to keep being called, false otherwise.
uint16_t sol_socket_options::sub_api

To version each subclass.


The documentation for this struct was generated from the following file: