Concept defining the interface for tracking Nostr request/response pairs.
More...
#include <request_tracker.hpp>
template<typename T>
const std::string &event_id,
std::function<void(const nostr::protocol::ok &)> callback,
std::chrono::milliseconds timeout,
const nostr::protocol::ok &response,
const nostr::protocol::eose &eose_response) {
tracker.track(event_id, callback, timeout);
tracker.resolve(event_id, response);
tracker.resolve(event_id, eose_response);
{
tracker.template async_track<nostr::protocol::ok>(event_id, timeout)
} -> std::same_as<boost::asio::awaitable<nostr::protocol::ok>>;
{
tracker.template async_track<nostr::protocol::eose>(event_id, timeout)
} -> std::same_as<boost::asio::awaitable<nostr::protocol::eose>>;
}
Concept defining the interface for tracking Nostr request/response pairs.
Concept defining the interface for tracking Nostr request/response pairs.
Types satisfying this concept provide callback-based and coroutine-based tracking for matching Nostr responses (OK, EOSE) to their originating requests.
Definition at line 19 of file request_tracker.hpp.