llarp::io_uring::Loop

Inherits from llarp::EventLoop, std::enable_shared_from_this< Loop >

Public Functions

Name
constexpr ::io_uring * ring()
Loop(size_t queue_size, size_t worker_threads)
~Loop() override =default
template <typename Visit >
void
remove_handles_where(Visit v)
virtual void run() override
virtual bool running() const override
virtual llarp_time_t time_now() const override
virtual void call_later(llarp_time_t delay_ms, std::function< void(void)> callback) override
virtual void stop() override
virtual bool add_ticker(std::function< void(void)> ticker) override
virtual std::shared_ptr< EventLoopPoller > add_poller(int fd, std::function< void(void)> callback) override
add a new event loop poller
bool add_network_interface(std::shared_ptr< llarp::vpn::NetworkInterface > netif, std::function< void(llarp::net::IPPacket)> handler) override
virtual void call_soon(std::function< void(void)> f) override
virtual std::shared_ptr< llarp::EventLoopWakeup > make_waker(std::function< void()> callback) override
Make a thread-safe event loop waker (an "async" in libuv terminology) on this event loop; you can call ->Trigger() on the returned shared pointer to fire the callback at the next available event loop iteration.
virtual std::shared_ptr< EventLoopRepeater > make_repeater() override
virtual std::shared_ptr< llarp::UDPHandle > make_udp(UDPReceiveFunc on_recv) override
virtual std::shared_ptr< uvw::Loop > MaybeGetUVWLoop() override
virtual void wakeup() override
void io_wakeup() const
called before doing io on wakeup.
virtual bool inEventLoop() const override
virtual void queue_work(std::unique_ptr< EventLoopWork > work) override
virtual void queue_slow_work(std::unique_ptr< EventLoopWork > work) override
virtual size_t num_worker_threads() const override

Additional inherited members

Public Types inherited from llarp::EventLoop

Name
using std::function< void(UDPHandle &, SockAddr src, llarp::OwnedBuffer buf)> UDPReceiveFunc

Public Functions inherited from llarp::EventLoop

Name
template <typename Callable >
void
call(Callable && f)
template <typename Callable >
void
call_every(llarp_time_t repeat, std::weak_ptr< void > owner, Callable f)
template <typename Callable >
auto
make_caller(Callable f)
virtual ~EventLoop() =default
virtual const net::Platform * Net_ptr() const
std::shared_ptr< EventLoop > create(size_t num_threads, size_t queueLength =event_loop_queue_size)

Public Functions Documentation

function ring

inline constexpr ::io_uring * ring()

function Loop

Loop(
    size_t queue_size,
    size_t worker_threads
)

function ~Loop

~Loop() override =default

function remove_handles_where

template <typename Visit >
inline void remove_handles_where(
    Visit v
)

function run

virtual void run() override

Reimplements: llarp::EventLoop::run

function running

virtual bool running() const override

Reimplements: llarp::EventLoop::running

function time_now

virtual llarp_time_t time_now() const override

Reimplements: llarp::EventLoop::time_now

function call_later

virtual void call_later(
    llarp_time_t delay_ms,
    std::function< void(void)> callback
) override

Reimplements: llarp::EventLoop::call_later

function stop

virtual void stop() override

Reimplements: llarp::EventLoop::stop

function add_ticker

virtual bool add_ticker(
    std::function< void(void)> ticker
) override

Reimplements: llarp::EventLoop::add_ticker

function add_poller

virtual std::shared_ptr< EventLoopPoller > add_poller(
    int fd,
    std::function< void(void)> callback
) override

add a new event loop poller

Reimplements: llarp::EventLoop::add_poller

function add_network_interface

bool add_network_interface(
    std::shared_ptr< llarp::vpn::NetworkInterface > netif,
    std::function< void(llarp::net::IPPacket)> handler
) override

function call_soon

virtual void call_soon(
    std::function< void(void)> f
) override

Reimplements: llarp::EventLoop::call_soon

function make_waker

virtual std::shared_ptr< llarp::EventLoopWakeup > make_waker(
    std::function< void()> callback
) override

Make a thread-safe event loop waker (an "async" in libuv terminology) on this event loop; you can call ->Trigger() on the returned shared pointer to fire the callback at the next available event loop iteration.

Reimplements: llarp::EventLoop::make_waker

(Multiple Trigger calls invoked before the call is actually made are coalesced into one call).

function make_repeater

virtual std::shared_ptr< EventLoopRepeater > make_repeater() override

Reimplements: llarp::EventLoop::make_repeater

function make_udp

virtual std::shared_ptr< llarp::UDPHandle > make_udp(
    UDPReceiveFunc on_recv
) override

Reimplements: llarp::EventLoop::make_udp

function MaybeGetUVWLoop

inline virtual std::shared_ptr< uvw::Loop > MaybeGetUVWLoop() override

Reimplements: llarp::EventLoop::MaybeGetUVWLoop

function wakeup

virtual void wakeup() override

Reimplements: llarp::EventLoop::wakeup

function io_wakeup

void io_wakeup() const

called before doing io on wakeup.

function inEventLoop

virtual bool inEventLoop() const override

Reimplements: llarp::EventLoop::inEventLoop

function queue_work

virtual void queue_work(
    std::unique_ptr< EventLoopWork > work
) override

Reimplements: llarp::EventLoop::queue_work

function queue_slow_work

virtual void queue_slow_work(
    std::unique_ptr< EventLoopWork > work
) override

Reimplements: llarp::EventLoop::queue_slow_work

function num_worker_threads

virtual size_t num_worker_threads() const override

Reimplements: llarp::EventLoop::num_worker_threads


Updated on 2026-01-10 at 22:49:45 +0000