|
void | get (InfoHash id, GetCallbackSimple cb, DoneCallback donecb={}, Value::Filter f=Value::AllFilter(), Where w={}) |
|
void | get (InfoHash id, GetCallbackSimple cb, DoneCallbackSimple donecb={}, Value::Filter f=Value::AllFilter(), 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=Value::AllFilter(), Where w={}) |
|
void | get (const std::string &key, GetCallback vcb, DoneCallbackSimple dcb={}, Value::Filter f=Value::AllFilter(), 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=Value::AllFilter(), 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=Value::AllFilter(), 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=Value::AllFilter(), Where w={}) |
|
std::future< size_t > | listen (InfoHash key, GetCallbackSimple cb, Value::Filter f=Value::AllFilter(), Where w={}) |
|
template<class T > |
std::future< size_t > | listen (InfoHash hash, std::function< bool(std::vector< T > &&)> cb) |
|
template<typename T > |
std::future< size_t > | listen (InfoHash hash, std::function< bool(T &&)> cb, Value::Filter f=Value::AllFilter(), 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, const Value::Id &id) |
|
void | putSigned (InfoHash hash, std::shared_ptr< Value > value, DoneCallback cb={}) |
|
void | putSigned (InfoHash hash, std::shared_ptr< Value > value, DoneCallbackSimple cb) |
|
void | putSigned (InfoHash hash, Value &&value, DoneCallback cb={}) |
|
void | putSigned (InfoHash hash, Value &&value, DoneCallbackSimple cb) |
|
void | putSigned (const std::string &key, Value &&value, DoneCallbackSimple cb={}) |
|
void | putEncrypted (InfoHash hash, InfoHash to, std::shared_ptr< Value > value, DoneCallback cb={}) |
|
void | putEncrypted (InfoHash hash, InfoHash to, std::shared_ptr< Value > value, DoneCallbackSimple cb) |
|
void | putEncrypted (InfoHash hash, InfoHash to, Value &&value, DoneCallback cb={}) |
|
void | putEncrypted (InfoHash hash, InfoHash to, Value &&value, DoneCallbackSimple cb) |
|
void | putEncrypted (const std::string &key, InfoHash to, Value &&value, DoneCallback cb={}) |
|
void | bootstrap (const std::vector< SockAddr > &nodes, DoneCallbackSimple &&cb={}) |
|
void | bootstrap (const SockAddr &addr, DoneCallbackSimple &&cb={}) |
|
void | bootstrap (const std::vector< NodeExport > &nodes) |
|
void | bootstrap (const std::string &host, const std::string &service) |
|
void | clearBootstrap () |
|
void | connectivityChanged () |
|
void | dumpTables () const |
|
InfoHash | getId () const |
|
InfoHash | getNodeId () const |
|
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 | setStorageLimit (size_t limit=DEFAULT_STORAGE_LIMIT) |
|
std::vector< NodeExport > | exportNodes () const |
|
std::vector< ValuesExport > | exportValues () const |
|
void | setLoggers (LogMethod err=NOLOG, LogMethod warn=NOLOG, LogMethod debug=NOLOG) |
|
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 |
|
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) |
|
std::vector< std::string > | getPublicAddressStr (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=4222, const crypto::Identity identity={}, bool threaded=false, NetId network=0) |
|
void | run (in_port_t port, Config config) |
|
void | run (const SockAddr &local4, const SockAddr &local6, Config config) |
|
void | run (const char *ip4, const char *ip6, const char *service, Config config) |
|
void | setOnStatusChanged (StatusCallback &&cb) |
|
time_point | loop () |
|
void | shutdown (ShutdownCallback cb) |
|
void | join () |
|
void | setProxyServer (const std::string &proxy, const std::string &pushNodeId="") |
|
void | enableProxy (bool proxify) |
|
void | setPushNotificationToken (const std::string &token) |
|
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 51 of file dhtrunner.h.