llarp::dht::TXHolder
Public Types
| Name | |
|---|---|
| using std::unique_ptr< TX< K, V > > | TXPtr |
Public Functions
| Name | |
|---|---|
| const TX< K, V > * | GetPendingLookupFrom(const TXOwner & owner) const |
| bool | HasLookupFor(const K & target) const |
| bool | HasPendingLookupFrom(const TXOwner & owner) const |
| void | NewTX(const TXOwner & askpeer, const TXOwner & whoasked, const K & k, TX< K, V > * t, llarp_time_t requestTimeoutMS =15s) |
| void | NotFound(const TXOwner & from, const std::unique_ptr< Key_t > & next) mark tx as not fond |
| void | Found(const TXOwner & from, const K & k, const std::vector< V > & values) |
| void | Inform(TXOwner from, K key, std::vector< V > values, bool sendreply =false, bool removeTimeouts =true) inform all watches for key of values found |
| void | Expire(llarp_time_t now) |
Public Attributes
| Name | |
|---|---|
| std::unordered_multimap< K, TXOwner > | waiting |
| std::unordered_map< K, llarp_time_t > | timeouts |
| std::unordered_map< TXOwner, TXPtr > | tx |
Detailed Description
template <typename K ,
typename V >
struct llarp::dht::TXHolder;
Public Types Documentation
using TXPtr
using llarp::dht::TXHolder< K, V >::TXPtr = std::unique_ptr<TX<K, V> >;
Public Functions Documentation
function GetPendingLookupFrom
const TX< K, V > * GetPendingLookupFrom(
const TXOwner & owner
) const
function HasLookupFor
inline bool HasLookupFor(
const K & target
) const
function HasPendingLookupFrom
inline bool HasPendingLookupFrom(
const TXOwner & owner
) const
function NewTX
void NewTX(
const TXOwner & askpeer,
const TXOwner & whoasked,
const K & k,
TX< K, V > * t,
llarp_time_t requestTimeoutMS =15s
)
function NotFound
void NotFound(
const TXOwner & from,
const std::unique_ptr< Key_t > & next
)
mark tx as not fond
function Found
inline void Found(
const TXOwner & from,
const K & k,
const std::vector< V > & values
)
function Inform
void Inform(
TXOwner from,
K key,
std::vector< V > values,
bool sendreply =false,
bool removeTimeouts =true
)
inform all watches for key of values found
function Expire
void Expire(
llarp_time_t now
)
Public Attributes Documentation
variable waiting
std::unordered_multimap< K, TXOwner > waiting;
variable timeouts
std::unordered_map< K, llarp_time_t > timeouts;
variable tx
std::unordered_map< TXOwner, TXPtr > tx;
Updated on 2026-01-10 at 22:49:45 +0000