Skip to the content.

🏠 Home | Next: Basic Usage >


Getting Started

To use cpp-udpnet, include the cppudpnet.hpp header in your project. It also depends on cpp-pubsub and cpp-asyncworker.

Integration

You can have CMake automatically download and integrate cpp-udpnet and its dependencies.

include(FetchContent)

FetchContent_Declare(
  cppudpnet
  GIT_REPOSITORY https://github.com/jonoton/cpp-udpnet.git
  GIT_TAG main
)
FetchContent_MakeAvailable(cppudpnet)

target_link_libraries(your_target PRIVATE cppudpnet::cppudpnet)

2. Manual Include

Since cpp-udpnet is a header-only library, you can simply copy cppudpnet.hpp into your project. You will also need to include cpppubsub.hpp and cppasyncworker.hpp from their respective repositories.

Prerequisites

Platform-Specific Notes

Dependencies

Dependency Purpose
cpp-pubsub Event-driven publish/subscribe messaging
cpp-asyncworker Thread pool and asynchronous worker management

Both dependencies are automatically fetched by CMake’s FetchContent when using the recommended integration method.


🏠 Home Next: Basic Usage >