A simple C++ wrapper for the Libevent portable polling solution. Only basic Libevent functionality has been included to meet personal requirements.
- Install pre-built library
- Download the *-Darwin.tar.gz package in
/build - Unzip in a directory of your choosing
- Build from source (with CMake)
- Download the *-Source.tar.gz package and unzip anywhere
- From the command line, navigate to the build folder
- Execute the following line:
cmake --install . --prefix "[INSTALL_DIR]"
You should then be able to use the CMake find_package command:
find_package(Libevent REQUIRED) # Required as a dependency but will not need to be linked
find_package(LibeventPlus) # Link against this library Most function names have been kept close to their Libevent counterparts.
An EventBase is instantiated, and from this its member function new_event() creates Events for its underlying base. Events can then access related event functions, such as adding, removing & setting priority.
Use of this library should be guided, if not entirely informed, by the official Libevent docs: https://libevent.org/libevent-book/