We revert the implementation of CoapCallback to use function pointers because Arduino doesn't have access to the C++ 11 standard template library (so can't use typedef std::function<void(CoapPacket &, IPAddress, int)> CoapCallback;)
We reduce the maximum size of the COAP buffer so it works out-of-the-box with the Arduino Uno. I've changed it to 128, but you can get away with 256 (or potentially even 512) - but this doesn't leave you much space to play with on the Arduino Uno.
This pull request does two things:
We revert the implementation of CoapCallback to use function pointers because Arduino doesn't have access to the C++ 11 standard template library (so can't use
typedef std::function<void(CoapPacket &, IPAddress, int)> CoapCallback;
)We reduce the maximum size of the COAP buffer so it works out-of-the-box with the Arduino Uno. I've changed it to 128, but you can get away with 256 (or potentially even 512) - but this doesn't leave you much space to play with on the Arduino Uno.
Regards,
Alex