|
void | coap_free_endpoint (coap_endpoint_t *ep) |
|
static const char * | coap_socket_format_errno (int error) |
|
struct coap_endpoint_t * | coap_malloc_endpoint (void) |
|
void | coap_mfree_endpoint (struct coap_endpoint_t *ep) |
|
int | coap_socket_bind_udp (coap_socket_t *sock, const coap_address_t *listen_addr, coap_address_t *bound_addr) |
|
int | coap_socket_connect_tcp1 (coap_socket_t *sock, const coap_address_t *local_if, const coap_address_t *server, int default_port, coap_address_t *local_addr, coap_address_t *remote_addr) |
|
int | coap_socket_connect_tcp2 (coap_socket_t *sock, coap_address_t *local_addr, coap_address_t *remote_addr) |
|
int | coap_socket_bind_tcp (coap_socket_t *sock, const coap_address_t *listen_addr, coap_address_t *bound_addr) |
|
int | coap_socket_accept_tcp (coap_socket_t *server, coap_socket_t *new_client, coap_address_t *local_addr, coap_address_t *remote_addr) |
|
int | coap_socket_connect_udp (coap_socket_t *sock, const coap_address_t *local_if, const coap_address_t *server, int default_port, coap_address_t *local_addr, coap_address_t *remote_addr) |
|
void | coap_socket_close (coap_socket_t *sock) |
|
ssize_t | coap_socket_write (coap_socket_t *sock, const uint8_t *data, size_t data_len) |
|
ssize_t | coap_socket_read (coap_socket_t *sock, uint8_t *data, size_t data_len) |
|
ssize_t | coap_network_send (coap_socket_t *sock, const coap_session_t *session, const uint8_t *data, size_t datalen) |
|
void | coap_packet_get_memmapped (coap_packet_t *packet, unsigned char **address, size_t *length) |
| Given a packet, set msg and msg_len to an address and length of the packet's data in memory. More...
|
|
ssize_t | coap_network_read (coap_socket_t *sock, coap_packet_t *packet) |
| Function interface for reading data. More...
|
|
unsigned int | coap_io_prepare_epoll (coap_context_t *ctx, coap_tick_t now) |
| Any now timed out delayed packet is transmitted, along with any packets associated with requested observable response. More...
|
|
unsigned int | coap_write (coap_context_t *ctx, coap_socket_t *sockets[], unsigned int max_sockets, unsigned int *num_sockets, coap_tick_t now) |
| For applications with their own message loop, send all pending retransmits and return the list of sockets with events to wait for and the next timeout The application should call coap_read, then coap_write again when any condition below is true: More...
|
|
int | coap_run_once (coap_context_t *ctx, unsigned timeout_ms) |
|
const char * | coap_socket_strerror (void) |
|
ssize_t | coap_socket_send (coap_socket_t *sock, coap_session_t *session, const uint8_t *data, size_t data_len) |
|
Any now timed out delayed packet is transmitted, along with any packets associated with requested observable response.
In addition, it returns when the next expected I/O is expected to take place (e.g. a packet retransmit).
Note: If epoll support is compiled into libcoap, coap_io_prepare_epoll() must be used instead of coap_write().
Internal function.
- Parameters
-
ctx | The CoAP context |
now | Current time. |
- Returns
- timeout Maxmimum number of milliseconds that can be used by a epoll_wait() to wait for network events or 0 if wait should be forever.
Definition at line 1248 of file coap_io.c.