28 SocketGuard(boost::asio::io_context& io, std::string_view label)
noexcept;
31 SocketGuard(boost::asio::io_context& io, std::string_view label,
32 uint32_t group_mask)
noexcept;
46 auto ensure_open() -> std::expected<void, std::error_code>;
SocketGuard(SocketGuard &&)=delete
auto socket() -> Socket &
Access the underlying Socket instance.
Definition nl_socket_guard.cxx:30
auto ensure_open() -> std::expected< void, std::error_code >
Ensure the underlying socket is open, opening it if necessary.
Definition nl_socket_guard.cxx:34
SocketGuard(boost::asio::io_context &io, std::string_view label) noexcept
Construct a SocketGuard holding a labeled Socket.
Definition nl_socket_guard.cxx:22
SocketGuard & operator=(const SocketGuard &)=delete
SocketGuard & operator=(SocketGuard &&)=delete
SocketGuard(const SocketGuard &)=delete
uint32_t group_mask_
Definition nl_socket_guard.hxx:53
void stop()
Stop and close the guarded socket.
Definition nl_socket_guard.cxx:54
Socket socket_
Definition nl_socket_guard.hxx:52
RAII wrapper for a Boost.Asio netlink socket.
Definition nl_socket.hxx:46
Definition nl_socket.hxx:27
Definition nl_socket.hxx:26
Definition nl_common.hxx:21
Definition nl_common.hxx:20
Netlink socket helper declarations.