nanocoap_sock.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2017 Kaspar Schleiser <kaspar@schleiser.de>
3  *
4  * This file is subject to the terms and conditions of the GNU Lesser
5  * General Public License v2.1. See the file LICENSE in the top level
6  * directory for more details.
7  */
8 
20 #ifndef NET_NANOCOAP_SOCK_H
21 #define NET_NANOCOAP_SOCK_H
22 
23 #include <stdint.h>
24 #include <unistd.h>
25 
26 #include "net/sock/udp.h"
27 
28 #ifdef __cplusplus
29 extern "C" {
30 #endif
31 
44 int nanocoap_server(sock_udp_ep_t *local, uint8_t *buf, size_t bufsize);
45 
57 ssize_t nanocoap_get(sock_udp_ep_t *remote, const char *path, uint8_t *buf,
58  size_t len);
59 
60 #ifdef __cplusplus
61 }
62 #endif
63 #endif /* NET_NANOCOAP_SOCK_H */
64 
ssize_t nanocoap_get(sock_udp_ep_t *remote, const char *path, uint8_t *buf, size_t len)
Simple synchronous CoAP get.
UDP sock definitions.
signed int ssize_t
Used for a count of bytes or an error indication.
Definition: msp430_types.h:89
Common IP-based transport layer end point.
Definition: sock.h:195
int nanocoap_server(sock_udp_ep_t *local, uint8_t *buf, size_t bufsize)
Start a nanocoap server instance.