llarp::UDPHandle

Public Types

Name
using EventLoop::UDPReceiveFunc ReceiveFunc

Public Functions

Name
virtual bool listen(const SockAddr & addr) =0
virtual bool send(const SockAddr & dest, const llarp_buffer_t & buf) =0
virtual void close() =0
virtual std::optional< int > file_descriptor()
virtual std::optional< SockAddr > LocalAddr() const =0
returns the local address we are bound on
virtual ~UDPHandle() =default

Protected Functions

Name
UDPHandle(ReceiveFunc on_recv)

Protected Attributes

Name
ReceiveFunc on_recv

Public Types Documentation

using ReceiveFunc

using llarp::UDPHandle::ReceiveFunc =  EventLoop::UDPReceiveFunc;

Public Functions Documentation

function listen

virtual bool listen(
    const SockAddr & addr
) =0

function send

virtual bool send(
    const SockAddr & dest,
    const llarp_buffer_t & buf
) =0

function close

virtual void close() =0

function file_descriptor

inline virtual std::optional< int > file_descriptor()

function LocalAddr

virtual std::optional< SockAddr > LocalAddr() const =0

returns the local address we are bound on

function ~UDPHandle

virtual ~UDPHandle() =default

Protected Functions Documentation

function UDPHandle

inline explicit UDPHandle(
    ReceiveFunc on_recv
)

Protected Attributes Documentation

variable on_recv

ReceiveFunc on_recv;

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