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: server.cpp
- Revision:
- 16:62a87be3f0b8
- Parent:
- 11:642eaabf1c2b
- Child:
- 17:3e1d176e2d4a
--- a/server.cpp Wed Oct 21 12:35:02 2015 +0000 +++ b/server.cpp Wed Oct 21 12:52:04 2015 +0000 @@ -13,6 +13,11 @@ server.bind(5683); } +void Server::enableBroadcast(int broadcast) +{ + server.set_broadcasting(broadcast); +} + void Server::add(char* uri, void (*fnc)(Request*, Response*), CoapPDU::Code method) { Resource res = {uri, fnc, method};