uv
=> uv_a
:trollface:
PollHandle
offers start
and stop
as expected and they work exactly as their counterparts in libuv
libuv
is here, with uvw
it's just a matter of invoking a member function rather than a free function
libuv
nor uvw
, so it's up to you
auto loop = uvw::Loop::getDefault();
auto poller = loop->resource<uvw::PollHandle>(fd);
poller->on<uvw::PollEvent>(
[](const auto &, auto &req)
{
std::cout << "poller - some event?\n";
});
if(poller->init())
{
std::cout << "poller - initialized?\n";
poller->start(uvw::PollHandle::Event::READABLE);
}
else
{
std::cerr << "poller - error?\n";
}
loop->run();
uvw
is a layer on top of libuv
and makes you available what is exposed by the underlying library