libcoap/cci.20200424

A CoAP (RFC 7252) implementation in C
Recipe info
2023-11-08

Available packages
Linux
Windows
macOS
macOS Apple Silicon

Install
Add the following line to your conanfile.txt:
[requires]
libcoap/cci.20200424

Using libcoap

Note

If you are new with Conan, we recommend to read the section how to consume packages.

If you need additional assistance, please ask a question in the Conan Center Index repository.

Simplest use case consuming this recipe and assuming CMake as your local build tool:

[requires]
libcoap/cci.20200424
[generators]
CMakeDeps
CMakeToolchain
[layout]
cmake_layout
from conan import ConanFile
from conan.tools.cmake import cmake_layout


class ExampleRecipe(ConanFile):
    settings = "os", "compiler", "build_type", "arch"
    generators = "CMakeDeps", "CMakeToolchain"

    def requirements(self):
        self.requires("libcoap/cci.20200424")

    def layout(self):
        cmake_layout(self)

Now, you can run this Conan command to locally install (and build if necessary) this recipe and its dependencies (if any):

$ conan install conanfile.txt --build=missing

Useful information to take into account to consume this library:


These are the main declared targets:

  • CMake package name(s): libcoap
  • CMake target name(s): libcoap::coap
  • coap => libcoap::coap
    
  • pkg-config file name(s): libcoap-2-openssl.pc
  • coap => libcoap-2-openssl.pc
    

A simple use case using the CMake file name and the global target:

# ...
find_package(libcoap REQUIRED)
# ...
target_link_libraries(YOUR_TARGET libcoap::coap)

These are all the available headers. Some of these ones might be non-public; make sure of it by visiting the libcoap homepage listed above:

#include "coap2/address.h"
#include "coap2/async.h"
#include "coap2/bits.h"
#include "coap2/block.h"
#include "coap2/coap.h"
#include "coap2/coap_config.h"
#include "coap2/coap_debug.h"
#include "coap2/coap_dtls.h"
#include "coap2/coap_event.h"
#include "coap2/coap_forward_decls.h"
#include "coap2/coap_hashkey.h"
#include "coap2/coap_io.h"
#include "coap2/coap_mutex.h"
#include "coap2/coap_session.h"
#include "coap2/coap_time.h"
#include "coap2/encode.h"
#include "coap2/libcoap.h"
#include "coap2/lwippools.h"
#include "coap2/mem.h"
#include "coap2/net.h"
#include "coap2/option.h"
#include "coap2/pdu.h"
#include "coap2/prng.h"
#include "coap2/resource.h"
#include "coap2/str.h"
#include "coap2/subscribe.h"
#include "coap2/uri.h"
#include "coap2/uthash.h"
#include "coap2/utlist.h"