NPRPC docs

class Rpc

C++

class Rpc

Not documented.

include/nprpc/nprpc.hpp:599

Methods

virtual void add_to_host_json(std::string_view name, const ObjectId &object_id) = 0

Adds (or replaces) an entry in host.json, which tells browser clients which objects to connect to. Throws Exception for an empty name.

include/nprpc/nprpc.hpp:621

virtual void clear_host_json() = 0

Removes every host.json entry.

include/nprpc/nprpc.hpp:623

virtual void configure_quic_client_tls(const QuicClientTlsConfig &config) = 0

Configure TLS for NEW outbound QUIC connections; existing sessions retain their identity. Safe to call on a runtime borrowed from another component.

include/nprpc/nprpc.hpp:604

PoaBuilder create_poa()

Starts configuring a new POA.

include/nprpc/nprpc.hpp:608

virtual void destroy() = 0

Stops every listener and the event loop, and frees the runtime.

include/nprpc/nprpc.hpp:618

virtual void destroy_poa(Poa *poa) = 0

Removes a POA created by PoaBuilder::build().

include/nprpc/nprpc.hpp:610

virtual ObjectPtr<common::Nameserver> get_nameserver(std::string_view nameserver_ip) = 0

A proxy for the npnameserver at nameserver_ip (TCP port 15000 or WebSocket port 15001, whichever transports are compiled in).

include/nprpc/nprpc.hpp:629

virtual SessionContext *get_object_session_context(Object *obj) = 0

The session calls to obj go through, or nullptr if none is open.

include/nprpc/nprpc.hpp:631

virtual boost::asio::io_context &ioc() noexcept = 0

The Boost.Asio context the runtime's I/O runs on.

include/nprpc/nprpc.hpp:612

virtual std::string produce_host_json(std::string_view output_path = {}) = 0

Writes host.json to output_path, or to the HTTP root when empty, and returns the path written. Throws Exception if neither is set.

include/nprpc/nprpc.hpp:626

virtual void run() = 0

Runs the event loop on the calling thread until destroy().

include/nprpc/nprpc.hpp:616

virtual void start_thread_pool(size_t thread_count) noexcept = 0

Runs the event loop on thread_count background threads and returns.

include/nprpc/nprpc.hpp:614

virtual std::string telemetry_reference() const = 0

Telemetry management reference, empty unless enabled by the builder.

include/nprpc/nprpc.hpp:606