|
libcoap 4.3.5-develop-13abce9
|
Internal API for handling CoAP TCP (RFC8323) More...
Collaboration diagram for Stream (TCP) Support:Functions | |
| 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) |
| Create a new TCP socket and initiate the connection. | |
| int | coap_socket_connect_tcp2 (coap_socket_t *sock, coap_address_t *local_addr, coap_address_t *remote_addr) |
| Complete the TCP Connection. | |
| int | coap_socket_bind_tcp (coap_socket_t *sock, const coap_address_t *listen_addr, coap_address_t *bound_addr) |
| Create a new TCP socket and then listen for new incoming TCP sessions. | |
| int | coap_socket_accept_tcp (coap_socket_t *server, coap_socket_t *new_client, coap_address_t *local_addr, coap_address_t *remote_addr, void *extra) |
| Accept a new incoming TCP session. | |
| ssize_t | coap_socket_write (coap_socket_t *sock, const uint8_t *data, size_t data_len) |
| Function interface for data stream sending off a socket. | |
| ssize_t | coap_socket_read (coap_socket_t *sock, uint8_t *data, size_t data_len) |
| Function interface for data stream receiving off a socket. | |
| void | coap_socket_strm_close (coap_socket_t *sock) |
| Function interface to close off a stream socket. | |
Internal API for handling CoAP TCP (RFC8323)
| int coap_socket_accept_tcp | ( | coap_socket_t * | server, |
| coap_socket_t * | new_client, | ||
| coap_address_t * | local_addr, | ||
| coap_address_t * | remote_addr, | ||
| void * | extra | ||
| ) |
Accept a new incoming TCP session.
Internal function.
| server | The socket information to use to accept the TCP connection. |
| new_client | Filled in socket information with the new incoming session information. |
| local_addr | Filled in with the local address. |
| remote_addr | Filled in with the remote address. |
| extra | Available for use by any underlying network stack. |
1 if succesful, 0 if failure of some sort. Definition at line 328 of file coap_strm_posix.c.
Here is the call graph for this function:| int coap_socket_bind_tcp | ( | coap_socket_t * | sock, |
| const coap_address_t * | listen_addr, | ||
| coap_address_t * | bound_addr | ||
| ) |
Create a new TCP socket and then listen for new incoming TCP sessions.
Internal function.
| sock | Where socket information is to be filled in. |
| listen_addr | The address to be listening for new incoming sessions. |
| bound_addr | Filled in with the address that the TCP layer is listening on for new incoming TCP sessions. |
1 if succesful, 0 if failure of some sort. Definition at line 237 of file coap_strm_posix.c.
Here is the call graph for this function:| 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 | ||
| ) |
Create a new TCP socket and initiate the connection.
Internal function.
| sock | Where socket information is to be filled in. |
| local_if | The local address to use or NULL. |
| server | The address to connect to. |
| default_port | The port to use if not set in server. |
| local_addr | Filled in after connection initiation with the local address. |
| remote_addr | Filled in after connection initiation with the remote address. |
1 if succesful, 0 if failure of some sort. Definition at line 71 of file coap_strm_posix.c.
Here is the call graph for this function:| int coap_socket_connect_tcp2 | ( | coap_socket_t * | sock, |
| coap_address_t * | local_addr, | ||
| coap_address_t * | remote_addr | ||
| ) |
Complete the TCP Connection.
Internal function.
| sock | The socket information to use. |
| local_addr | Filled in with the final local address. |
| remote_addr | Filled in with the final remote address. |
1 if succesful, 0 if failure of some sort. Definition at line 198 of file coap_strm_posix.c.
Here is the call graph for this function:| ssize_t coap_socket_read | ( | coap_socket_t * | sock, |
| uint8_t * | data, | ||
| size_t | data_len | ||
| ) |
Function interface for data stream receiving off a socket.
| sock | Socket to receive data on. |
| data | The data to receive. |
| data_len | The maximum length of data. |
Definition at line 433 of file coap_strm_posix.c.
Here is the call graph for this function:
Here is the caller graph for this function:| void coap_socket_strm_close | ( | coap_socket_t * | sock | ) |
Function interface to close off a stream socket.
Internal function.
| sock | Socket to close. |
Definition at line 470 of file coap_strm_posix.c.
Here is the call graph for this function:
Here is the caller graph for this function:| ssize_t coap_socket_write | ( | coap_socket_t * | sock, |
| const uint8_t * | data, | ||
| size_t | data_len | ||
| ) |
Function interface for data stream sending off a socket.
| sock | Socket to send data over. |
| data | The data to send. |
| data_len | The length of data. |
Definition at line 374 of file coap_strm_posix.c.
Here is the call graph for this function:
Here is the caller graph for this function: