57 #ifndef SOL_NO_API_VERSION
58 #define SOL_SOCKET_OPTIONS_API_VERSION (1)
102 #ifndef SOL_NO_API_VERSION
103 #define SOL_SOCKET_IP_OPTIONS_SUB_API_VERSION (1)
151 #ifndef SOL_NO_API_VERSION
152 #define SOL_SOCKET_TYPE_API_VERSION (1)
156 uint16_t api_version;
uint16_t cipher_suites_len
If secure is true, this should be considered.
Definition: sol-socket.h:140
Structure to represent a socket.
Definition: sol-socket.h:247
const struct sol_socket_type * type
Definition: sol-socket.h:248
bool reuse_addr
Allow reuse of local addresses.
Definition: sol-socket.h:127
void(* del)(struct sol_socket *s)
Function to be called when the socket is deleted.
Definition: sol-socket.h:164
ssize_t(* sendmsg)(struct sol_socket *s, const struct sol_buffer *buffer, const struct sol_network_link_addr *cliaddr)
Function to be called to write data in the socket.
Definition: sol-socket.h:214
union sol_network_link_addr::@10 addr
The address itself.
ssize_t sol_socket_sendmsg(struct sol_socket *s, const struct sol_buffer *buffer, const struct sol_network_link_addr *cliaddr)
Transmits a message using the socket.
Definition: sol-socket.h:49
int sol_socket_set_read_monitor(struct sol_socket *s, bool on)
Adds a function to be called when the socket had data to be read.
struct sol_socket_ip_options sol_socket_ip_options
Defines specific IP layer related behaviour of a socket instance.
Definition: sol-socket.h:48
struct sol_socket_options sol_socket_options
Defines the behaviour of a socket instance.
int(* set_write_monitor)(struct sol_socket *s, bool on)
Starts or stops monitoring the socket for writing.
Definition: sol-socket.h:186
ssize_t sol_socket_recvmsg(struct sol_socket *s, struct sol_buffer *buffer, struct sol_network_link_addr *cliaddr)
Receive a message from a socket.
bool(* on_can_read)(void *data, struct sol_socket *s)
Register a function to be called when the socket has data to be read.
Definition: sol-socket.h:77
enum sol_network_family family
The family that should be used when creating the socket.
Definition: sol-socket.h:110
bool secure
If the socket's data should be encrypted or not.
Definition: sol-socket.h:115
void sol_socket_del(struct sol_socket *s)
Destroy the socket instance.
int(* set_read_monitor)(struct sol_socket *s, bool on)
Starts or stops monitoring the socket for reading.
Definition: sol-socket.h:175
bool reuse_port
Allows multiple sockets to be bound to the same socket address.
Definition: sol-socket.h:121
Structure to represent a network address, both IPv6 and IPv4 are valid.
Definition: sol-network.h:145
int(* bind)(struct sol_socket *s, const struct sol_network_link_addr *addr)
Function to be called to bind the socket to a network address.
Definition: sol-socket.h:239
struct sol_socket_type sol_socket_type
Structure to represent a socket class.
Structure to represent a socket class.
Definition: sol-socket.h:150
Defines the behaviour of a socket instance.
Definition: sol-socket.h:56
int(* join_group)(struct sol_socket *s, int ifindex, const struct sol_network_link_addr *group)
Function to be called to join a multicast group.
Definition: sol-socket.h:228
Defines specific IP layer related behaviour of a socket instance.
Definition: sol-socket.h:100
Definition: sol-socket.h:50
bool(* on_can_write)(void *data, struct sol_socket *s)
Register a function to be called when the socket is ready to be written.
Definition: sol-socket.h:87
const void * data
User data data will be given in on_can_read() and on_can_write()
Definition: sol-socket.h:93
sol_network_family
Type of a network address.
Definition: sol-network.h:114
struct sol_socket_options base
Definition: sol-socket.h:101
struct sol_socket sol_socket
Structure to represent a socket.
Definition: sol-socket.h:42
int sol_socket_bind(struct sol_socket *s, const struct sol_network_link_addr *addr)
Binds the socket to a specific address.
uint16_t sub_api
To version each subclass.
Definition: sol-socket.h:66
ssize_t(* recvmsg)(struct sol_socket *s, struct sol_buffer *buffer, struct sol_network_link_addr *cliaddr)
Function to be called to read data from socket.
Definition: sol-socket.h:202
int sol_socket_join_group(struct sol_socket *s, int ifindex, const struct sol_network_link_addr *group)
Joins a multicast group.
enum sol_socket_dtls_cipher * cipher_suites
If secure is true, this should be considered.
Definition: sol-socket.h:134
int sol_socket_set_write_monitor(struct sol_socket *s, bool on)
Adds a function to be called when the socket is able to send data.
sol_socket_dtls_cipher
Represents supported Cipher Suites for use with DTLS.
Definition: sol-socket.h:47
struct sol_socket * sol_socket_ip_new(const struct sol_socket_options *options)
Creates an endpoint for communication.
A sol_buffer is a dynamic array, that can be resized if needed.
Definition: sol-buffer.h:130
These are routines that Soletta provides for handling network link interfaces, making it possible to ...