Coap Client and Server

Dependencies:   DebugLib EthernetInterface cantcoap mbed-rtos

Dependents:   COAP coap

Fork of yeswecancoap by Sille Van Landschoot

YesWeCanCoap

Is a small coap client and server library for mbed based on the cantcoap library.

Import librarycantcoap

This is CoAP library with a focus on simplicity. It offers minimal CoAP PDU construction and decoding to and from byte buffers.

yeswecancoap server enables easy implementation of coap resources, each with a dedicated function. When the function is registered by the server, it will do the rest.

Coap server example

Repository: YesWeCanCoap-example

Coap client example

under construction

Revision:
7:1bed29e1b0a4
Parent:
5:1924c60356d0
--- a/request.cpp	Wed Oct 21 08:51:38 2015 +0000
+++ b/request.cpp	Wed Oct 21 10:23:21 2015 +0000
@@ -15,3 +15,19 @@
     
 }
 
+char* Request::getContent()
+{
+    return reinterpret_cast<char*>(CoapPDU::getPayloadPointer());
+}
+
+int Request::getContentLength()
+{
+    return CoapPDU::getPayloadLength();
+}
+
+int Request::hasContent()
+{
+    return CoapPDU::getPayloadLength();
+}
+
+