Roc Toolkit internal modules
Roc Toolkit: real-time audio streaming
|
Hostname resolver. More...
#include <resolver.h>
Public Member Functions | |
Resolver (IResolverRequestHandler &req_handler, uv_loop_t &event_loop) | |
Initialize. More... | |
bool | async_resolve (ResolverRequest &req) |
Initiate asynchronous resolve request. More... | |
Hostname resolver.
Definition at line 25 of file resolver.h.
roc::netio::Resolver::Resolver | ( | IResolverRequestHandler & | req_handler, |
uv_loop_t & | event_loop | ||
) |
Initialize.
bool roc::netio::Resolver::async_resolve | ( | ResolverRequest & | req | ) |
Initiate asynchronous resolve request.
Should be called from event loop thread. Resolving itself will be run on the internal libuv thread pool.
When resolving is finished, IRequestHandler::handle_resolved() will be called on the event loop thread.
If there is no need for resolving or asynchronous request can't be started, fills req
and returns false.