RobertLeahy / ASIO-C-ARES

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

ASIO C-ARES

Build Status Build status

What is ASIO C-ARES

ASIO C-ARES is a C++14 library which allows the use of libcares with Boost.Asio. No need to manage select just use the provided composed asynchronous operations and run a boost::asio::io_service.

How does it work?

  1. Create an asio_cares::library object (an RAII wrapper for libcares global initialization/cleanup)
  2. Create an asio_cares::channel object
  3. Dispatch one or more questions on the channel using async_send
  4. Call async_process or call async_process_one until done returns true

Functions

  • done

Types

  • channel
  • library
  • string

Operations

  • async_process
  • async_process_one
  • async_send
  • cancel

Dependencies

  • Boost 1.58.0+
  • libcares 1.13.0+

Other libraries are depended on, but are header only and are downloaded by CMake:

  • Beast
  • Catch
  • MPark Variant

Requirements

  • Clang 4+ or GCC 6.2.0+ or Microsoft Visual C++ 2017+ (may work with earlier compilers, these are the oldest used for CI)
  • CMake 3.5+

Example

See unit tests.

About

License:The Unlicense


Languages

Language:C++ 88.6%Language:CMake 8.4%Language:Shell 2.0%Language:PowerShell 0.9%