|
void | get (InfoHash id, GetCallbackSimple cb, DoneCallback donecb={}, Value::Filter f={}, Where w={}) |
|
void | get (InfoHash id, GetCallbackSimple cb, DoneCallbackSimple donecb={}, Value::Filter f={}, Where w={}) |
|
void | get (InfoHash hash, GetCallback vcb, DoneCallback dcb, Value::Filter f={}, Where w={}) |
|
void | get (InfoHash id, GetCallback cb, DoneCallbackSimple donecb={}, Value::Filter f={}, Where w={}) |
|
void | get (const std::string &key, GetCallback vcb, DoneCallbackSimple dcb={}, Value::Filter f={}, Where w={}) |
|
template<class T > |
void | get (InfoHash hash, std::function< bool(std::vector< T > &&)> cb, DoneCallbackSimple dcb={}) |
|
template<class T > |
void | get (InfoHash hash, std::function< bool(T &&)> cb, DoneCallbackSimple dcb={}) |
|
std::future< std::vector< std::shared_ptr< dht::Value > > > | get (InfoHash key, Value::Filter f={}, Where w={}) |
|
template<class T > |
std::future< std::vector< T > > | get (InfoHash key) |
|
void | query (const InfoHash &hash, QueryCallback cb, DoneCallback done_cb={}, Query q={}) |
|
void | query (const InfoHash &hash, QueryCallback cb, DoneCallbackSimple done_cb={}, Query q={}) |
|
std::future< size_t > | listen (InfoHash key, ValueCallback vcb, Value::Filter f={}, Where w={}) |
|
std::future< size_t > | listen (InfoHash key, GetCallback cb, Value::Filter f={}, Where w={}) |
|
std::future< size_t > | listen (const std::string &key, GetCallback vcb, Value::Filter f={}, Where w={}) |
|
std::future< size_t > | listen (InfoHash key, GetCallbackSimple cb, Value::Filter f={}, Where w={}) |
|
template<class T > |
std::future< size_t > | listen (InfoHash hash, std::function< bool(std::vector< T > &&)> cb) |
|
template<class T > |
std::future< size_t > | listen (InfoHash hash, std::function< bool(std::vector< T > &&, bool)> cb) |
|
template<typename T > |
std::future< size_t > | listen (InfoHash hash, std::function< bool(T &&)> cb, Value::Filter f={}, Where w={}) |
|
template<typename T > |
std::future< size_t > | listen (InfoHash hash, std::function< bool(T &&, bool)> cb, Value::Filter f={}, Where w={}) |
|
void | cancelListen (InfoHash h, size_t token) |
|
void | cancelListen (InfoHash h, std::shared_future< size_t > token) |
|
void | put (InfoHash hash, std::shared_ptr< Value > value, DoneCallback cb={}, time_point created=time_point::max(), bool permanent=false) |
|
void | put (InfoHash hash, std::shared_ptr< Value > value, DoneCallbackSimple cb, time_point created=time_point::max(), bool permanent=false) |
|
void | put (InfoHash hash, Value &&value, DoneCallback cb={}, time_point created=time_point::max(), bool permanent=false) |
|
void | put (InfoHash hash, Value &&value, DoneCallbackSimple cb, time_point created=time_point::max(), bool permanent=false) |
|
void | put (const std::string &key, Value &&value, DoneCallbackSimple cb={}, time_point created=time_point::max(), bool permanent=false) |
|
void | cancelPut (const InfoHash &h, Value::Id id) |
|
void | cancelPut (const InfoHash &h, const std::shared_ptr< Value > &value) |
|
void | putSigned (InfoHash hash, std::shared_ptr< Value > value, DoneCallback cb={}, bool permanent=false) |
|
void | putSigned (InfoHash hash, std::shared_ptr< Value > value, DoneCallbackSimple cb, bool permanent=false) |
|
void | putSigned (InfoHash hash, Value &&value, DoneCallback cb={}, bool permanent=false) |
|
void | putSigned (InfoHash hash, Value &&value, DoneCallbackSimple cb, bool permanent=false) |
|
void | putSigned (const std::string &key, Value &&value, DoneCallbackSimple cb={}, bool permanent=false) |
|
void | putEncrypted (InfoHash hash, InfoHash to, std::shared_ptr< Value > value, DoneCallback cb={}, bool permanent=false) |
|
void | putEncrypted (InfoHash hash, InfoHash to, std::shared_ptr< Value > value, DoneCallbackSimple cb, bool permanent=false) |
|
void | putEncrypted (InfoHash hash, InfoHash to, Value &&value, DoneCallback cb={}, bool permanent=false) |
|
void | putEncrypted (InfoHash hash, InfoHash to, Value &&value, DoneCallbackSimple cb, bool permanent=false) |
|
void | putEncrypted (const std::string &key, InfoHash to, Value &&value, DoneCallback cb={}, bool permanent=false) |
|
void | putEncrypted (InfoHash hash, const std::shared_ptr< crypto::PublicKey > &to, std::shared_ptr< Value > value, DoneCallback cb={}, bool permanent=false) |
|
void | putEncrypted (InfoHash hash, const std::shared_ptr< crypto::PublicKey > &to, std::shared_ptr< Value > value, DoneCallbackSimple cb, bool permanent=false) |
|
void | putEncrypted (InfoHash hash, const std::shared_ptr< crypto::PublicKey > &to, Value &&value, DoneCallback cb={}, bool permanent=false) |
|
void | putEncrypted (InfoHash hash, const std::shared_ptr< crypto::PublicKey > &to, Value &&value, DoneCallbackSimple cb, bool permanent=false) |
|
void | bootstrap (std::vector< SockAddr > nodes, DoneCallbackSimple cb={}) |
|
void | bootstrap (SockAddr addr, DoneCallbackSimple cb={}) |
|
void | bootstrap (std::vector< NodeExport > nodes) |
|
void | bootstrap (const std::string &host, const std::string &service) |
|
void | bootstrap (const std::string &hostService) |
|
void | bootstrap (const InfoHash &id, const SockAddr &address) |
|
void | clearBootstrap () |
|
void | connectivityChanged () |
|
void | dumpTables () const |
|
InfoHash | getId () const |
|
std::shared_ptr< crypto::PublicKey > | getPublicKey () const |
|
InfoHash | getNodeId () const |
|
SockAddr | getBound (sa_family_t f=AF_INET) const |
|
in_port_t | getBoundPort (sa_family_t f=AF_INET) const |
|
std::pair< size_t, size_t > | getStoreSize () const |
|
void | getStorageLimit () const |
|
void | setStorageLimit (size_t limit=DEFAULT_STORAGE_LIMIT) |
|
std::vector< NodeExport > | exportNodes () const |
|
std::vector< ValuesExport > | exportValues () const |
|
void | setLogger (const Sp< Logger > &logger={}) |
|
void | setLogger (const Logger &logger) |
|
void | setLogFilter (const InfoHash &f={}) |
|
void | registerType (const ValueType &type) |
|
void | importValues (const std::vector< ValuesExport > &values) |
|
bool | isRunning () const |
|
NodeStats | getNodesStats (sa_family_t af) const |
|
unsigned | getNodesStats (sa_family_t af, unsigned *good_return, unsigned *dubious_return, unsigned *cached_return, unsigned *incoming_return) const |
|
NodeInfo | getNodeInfo () const |
|
void | getNodeInfo (std::function< void(std::shared_ptr< NodeInfo >)>) |
|
std::vector< unsigned > | getNodeMessageStats (bool in=false) const |
|
std::string | getStorageLog () const |
|
std::string | getStorageLog (const InfoHash &) const |
|
std::string | getRoutingTablesLog (sa_family_t af) const |
|
std::string | getSearchesLog (sa_family_t af=AF_UNSPEC) const |
|
std::string | getSearchLog (const InfoHash &, sa_family_t af=AF_UNSPEC) const |
|
std::vector< SockAddr > | getPublicAddress (sa_family_t af=AF_UNSPEC) const |
|
std::vector< std::string > | getPublicAddressStr (sa_family_t af=AF_UNSPEC) const |
|
void | getPublicAddress (std::function< void(std::vector< SockAddr > &&)>, sa_family_t af=AF_UNSPEC) |
|
void | findCertificate (InfoHash hash, std::function< void(const std::shared_ptr< crypto::Certificate > &)>) |
|
void | registerCertificate (std::shared_ptr< crypto::Certificate > cert) |
|
void | setLocalCertificateStore (CertificateStoreQuery &&query_method) |
|
void | run (in_port_t port=dht::net::DHT_DEFAULT_PORT, const crypto::Identity &identity={}, bool threaded=true, NetId network=0) |
|
void | run (in_port_t port, Config &config, Context &&context={}) |
|
void | run (const char *ip4, const char *ip6, const char *service, Config &config, Context &&context={}) |
|
void | run (const Config &config, Context &&context) |
|
void | setOnStatusChanged (StatusCallback &&cb) |
|
time_point | loop () |
|
void | shutdown (ShutdownCallback cb={}, bool stop=false) |
|
void | join () |
|
std::shared_ptr< PeerDiscovery > | getPeerDiscovery () const |
|
void | setProxyServer (const std::string &proxy, const std::string &pushNodeId="") |
|
void | enableProxy (bool proxify) |
|
void | setPushNotificationToken (const std::string &token) |
|
void | setPushNotificationTopic (const std::string &topic) |
|
void | setPushNotificationPlatform (const std::string &platform) |
|
void | pushNotificationReceived (const std::map< std::string, std::string > &data) |
|
void | forwardAllMessages (bool forward) |
|
Provides a thread-safe interface to run the (secure) DHT. The class will open sockets on the provided port and will either wait for (expectedly frequent) calls to loop() or start an internal thread that will update the DHT when appropriate.
Definition at line 54 of file dhtrunner.h.