aeron-driver/src/main/c/README.md
Here you will find the source for the C Media Driver for Aeron. The build process builds a binary for the driver and places it in the following location
${CMAKE_CURRENT_BINARY_DIR}/binaries/aeronmd
The driver binary requires the following dependencies.
${CMAKE_CURRENT_BINARY_DIR}/lib-lpthread - pthread Library-ldl - DL Library-lbsd - BSD Library (optional - will use /dev/urandom directly instead of arc4random if not available)-luuid - UUID Library (optional - will use pure random Receiver ID if not available)-lm - Math LibraryAll configuration for the C media driver is done, currently, via environment variables. The variables are directly related to the Java properties
for the Java media driver. The environment variables simply have _ in the place of .. For example, setting the environment variable AERON_TERM_BUFFER_LENGTH is equivalent
to setting aeron.term.buffer.length in the Java media driver.
The driver can be started simply by executing aeronmd.
$ aeronmd
The driver can be stopped gracefully via Control-C or SIGINT just like the Java media driver.
The C media driver may be embedded quite easily. An example is the driver main itself, aeronmd.c, and the API is documented in aeronmd.h.
The C media driver uses DL interception for logging. To use this logging, add the
Aeron C Driver Agent Library to LD_PRELOAD or DYLD_INSERT_LIBRARIES (for Mac.
Also requires flat namespace) and set the environment variable, AERON_EVENT_LOG
to a numeric mask for the events of interest. The following
script
may be used for convenience.