17 #ifndef __IOTC_BSP_IO_NET_H__ 18 #define __IOTC_BSP_IO_NET_H__ 256 size_t socket_events_array_size,
long timeout_sec);
290 const uint8_t* buf,
size_t count);
303 uint8_t* buf,
size_t count);
iotc_bsp_io_net_state_t iotc_bsp_io_net_write(iotc_bsp_socket_t iotc_socket_nonblocking, int *out_written_count, const uint8_t *buf, size_t count)
Writes data to a socket.
uint8_t in_socket_want_connect
1 if a connection request is made to a socket, 0 otherwise.
enum iotc_bsp_io_net_state_e iotc_bsp_io_net_state_t
The networking function states.
uint8_t in_socket_want_write
1 if a read request is made to a socket, 0 otherwise.
uint8_t out_socket_error
1 if an error occurs on the socket, 0 otherwise.
enum iotc_bsp_socket_type_e iotc_bsp_socket_type_t
The socket protocol.
iotc_bsp_socket_t iotc_socket
The platform-specific socket value.
uint8_t out_socket_connect_finished
1 if a connection request succeeded, 0 otherwise.
iotc_bsp_io_net_state_t iotc_bsp_io_net_socket_connect(iotc_bsp_socket_t *iotc_socket, const char *host, uint16_t port, iotc_bsp_socket_type_t socket_type)
iotc_bsp_io_net_state_t iotc_bsp_io_net_close_socket(iotc_bsp_socket_t *iotc_socket_nonblocking)
Closes a socket.
uint8_t out_socket_can_read
1 if data can be read from a socket, 0 otherwise.
intptr_t iotc_bsp_socket_t
The socket representation.
uint8_t out_socket_can_write
1 if data can be written to a socket, 0 otherwise.
enum iotc_bsp_protocol_type_e iotc_bsp_protocol_type_t
The version of the socket protocol.
uint8_t in_socket_want_error
1 if an error request is made to a socket, 0 otherwise.
uint8_t in_socket_want_read
1 if a write request is made to a socket, 0 otherwise.
The networking function succeeded.
struct iotc_bsp_socket_events_s iotc_bsp_socket_events_t
The socket state.
iotc_bsp_io_net_state_t iotc_bsp_io_net_connection_check(iotc_bsp_socket_t iotc_socket, const char *host, uint16_t port)
iotc_bsp_io_net_state_t iotc_bsp_io_net_select(iotc_bsp_socket_events_t *socket_events_array, size_t socket_events_array_size, long timeout_sec)
Checks a socket for scheduled read or write operations.
iotc_bsp_io_net_state_t iotc_bsp_io_net_read(iotc_bsp_socket_t iotc_socket_nonblocking, int *out_read_count, uint8_t *buf, size_t count)
Reads data from a socket.