Coap Client and Server
Dependencies: DebugLib EthernetInterface cantcoap mbed-rtos
Fork of yeswecancoap by
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
Diff: request.cpp
- Revision:
- 7:1bed29e1b0a4
- Parent:
- 5:1924c60356d0
diff -r 0c477f5b79ff -r 1bed29e1b0a4 request.cpp --- 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(); +} + +