My Project 3.2.0
C++ Distributed Hash Table
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Static Public Member Functions | List of all members
dht::SecureDht Class Referencefinal
Inheritance diagram for dht::SecureDht:
Inheritance graph
[legend]
Collaboration diagram for dht::SecureDht:
Collaboration graph
[legend]

Public Types

typedef std::function< void(bool)> SignatureCheckCallback
 
using Config = SecureDhtConfig
 
- Public Types inherited from dht::DhtInterface
using Status = NodeStatus
 
using NodeExport = dht::NodeExport
 

Public Member Functions

 SecureDht (std::unique_ptr< DhtInterface > dht, Config config, IdentityAnnouncedCb iacb={}, const std::shared_ptr< Logger > &l={})
 
InfoHash getId () const
 
PkId getLongId () const
 
Sp< crypto::PublicKeygetPublicKey () const
 
ValueType secureType (ValueType &&type)
 
ValueType secureType (const ValueType &type)
 
void registerType (const ValueType &type) override
 
void registerType (ValueType &&type)
 
void registerInsecureType (const ValueType &type)
 
void get (const InfoHash &id, GetCallback cb, DoneCallback donecb={}, Value::Filter &&={}, Where &&w={}) override
 
void get (const InfoHash &id, GetCallback cb, DoneCallbackSimple donecb={}, Value::Filter &&f={}, Where &&w={}) override
 
void get (const InfoHash &key, GetCallbackSimple cb, DoneCallback donecb={}, Value::Filter &&f={}, Where &&w={}) override
 
void get (const InfoHash &key, GetCallbackSimple cb, DoneCallbackSimple donecb, Value::Filter &&f={}, Where &&w={}) override
 
void putSigned (const InfoHash &hash, Sp< Value > val, DoneCallback callback, bool permanent=false)
 
void putSigned (const InfoHash &hash, Value &&v, DoneCallback callback, bool permanent=false)
 
void putEncrypted (const InfoHash &hash, const InfoHash &to, Sp< Value > val, DoneCallback callback, bool permanent=false)
 
void putEncrypted (const InfoHash &hash, const InfoHash &to, Value &&v, DoneCallback callback, bool permanent=false)
 
void putEncrypted (const InfoHash &hash, const crypto::PublicKey &to, Sp< Value > val, DoneCallback callback, bool permanent=false)
 
void putEncrypted (const InfoHash &hash, const crypto::PublicKey &to, Value &&v, DoneCallback callback, bool permanent=false)
 
void sign (Value &v) const
 
Value encrypt (Value &v, const crypto::PublicKey &to) const
 
Value decrypt (const Value &v)
 
void findCertificate (const InfoHash &node, const std::function< void(const Sp< crypto::Certificate >)> &cb)
 
void findPublicKey (const InfoHash &node, const std::function< void(const Sp< crypto::PublicKey >)> &cb)
 
Sp< crypto::CertificateregisterCertificate (const InfoHash &node, const Blob &cert)
 
void registerCertificate (Sp< crypto::Certificate > &cert)
 
Sp< crypto::CertificategetCertificate (const InfoHash &node) const
 
Sp< crypto::PublicKeygetPublicKey (const InfoHash &node) const
 
void setLocalCertificateStore (CertificateStoreQuery &&query_method)
 
void setOnPublicAddressChanged (PublicAddressChangedCb cb) override
 
void shutdown (ShutdownCallback cb, bool stop=false) override
 
void dumpTables () const override
 
const InfoHashgetNodeId () const override
 
std::pair< size_t, size_t > getStoreSize () const override
 
std::string getStorageLog () const override
 
std::string getStorageLog (const InfoHash &h) const override
 
void setStorageLimit (size_t limit=DEFAULT_STORAGE_LIMIT) override
 
size_t getStorageLimit () const override
 
std::vector< NodeExportexportNodes () const override
 
std::vector< ValuesExport > exportValues () const override
 
void importValues (const std::vector< ValuesExport > &v) override
 
NodeStats getNodesStats (sa_family_t af) const override
 
std::vector< unsigned > getNodeMessageStats (bool in=false) override
 
std::string getRoutingTablesLog (sa_family_t af) const override
 
std::string getSearchesLog (sa_family_t af) const override
 
std::string getSearchLog (const InfoHash &h, sa_family_t af=AF_UNSPEC) const override
 
std::vector< SockAddrgetPublicAddress (sa_family_t family=0) override
 
time_point periodic (const uint8_t *buf, size_t buflen, SockAddr sa, const time_point &now) override
 
time_point periodic (const uint8_t *buf, size_t buflen, const sockaddr *from, socklen_t fromlen, const time_point &now) override
 
NodeStatus updateStatus (sa_family_t af) override
 
NodeStatus getStatus (sa_family_t af) const override
 
NodeStatus getStatus () const override
 
net::DatagramSocketgetSocket () const override
 
bool isRunning (sa_family_t af=0) const override
 
const ValueTypegetType (ValueType::Id type_id) const override
 
void addBootstrap (const std::string &host, const std::string &service) override
 
void clearBootstrap () override
 
void insertNode (const InfoHash &id, const SockAddr &sa) override
 
void insertNode (const NodeExport &n) override
 
void pingNode (SockAddr sa, DoneCallbackSimple &&cb={}) override
 
void query (const InfoHash &key, QueryCallback cb, DoneCallback done_cb={}, Query &&q={}) override
 
void query (const InfoHash &key, QueryCallback cb, DoneCallbackSimple done_cb={}, Query &&q={}) override
 
std::vector< Sp< Value > > getLocal (const InfoHash &key, const Value::Filter &f={}) const override
 
Sp< ValuegetLocalById (const InfoHash &key, Value::Id vid) const override
 
void put (const InfoHash &key, Sp< Value > v, DoneCallback cb=nullptr, time_point created=time_point::max(), bool permanent=false) override
 
void put (const InfoHash &key, const Sp< Value > &v, DoneCallbackSimple cb, time_point created=time_point::max(), bool permanent=false) override
 
void put (const InfoHash &key, Value &&v, DoneCallback cb=nullptr, time_point created=time_point::max(), bool permanent=false) override
 
void put (const InfoHash &key, Value &&v, DoneCallbackSimple cb, time_point created=time_point::max(), bool permanent=false) override
 
std::vector< Sp< Value > > getPut (const InfoHash &h) const override
 
Sp< ValuegetPut (const InfoHash &h, const Value::Id &vid) const override
 
bool cancelPut (const InfoHash &h, const Value::Id &vid) override
 
size_t listen (const InfoHash &key, ValueCallback, Value::Filter={}, Where={}) override
 
size_t listen (const InfoHash &key, GetCallback cb, Value::Filter={}, Where w={}) override
 
size_t listen (const InfoHash &key, GetCallbackSimple cb, Value::Filter f={}, Where w={}) override
 
bool cancelListen (const InfoHash &h, size_t token) override
 
void connectivityChanged (sa_family_t af) override
 
void connectivityChanged () override
 
void forwardAllMessages (bool forward)
 
void setPushNotificationToken (const std::string &token="") override
 
void pushNotificationReceived (const std::map< std::string, std::string > &notification) override
 
void setLogger (const Logger &logger) override
 
void setLogger (const std::shared_ptr< Logger > &logger) override
 
void setLogFilter (const InfoHash &f) override
 
- Public Member Functions inherited from dht::DhtInterface
 DhtInterface (const Logger &l)
 
 DhtInterface (const std::shared_ptr< Logger > &l)
 
void addOnConnectedCallback (std::function< void()> cb)
 
virtual void setPushNotificationTopic (const std::string &)
 
virtual void setPushNotificationPlatform (const std::string &)
 

Static Public Member Functions

static dht::Config getConfig (const SecureDht::Config &conf)
 

Additional Inherited Members

- Protected Attributes inherited from dht::DhtInterface
std::shared_ptr< Loggerlogger_ {}
 
std::queue< std::function< void()> > onConnectCallbacks_ {}
 

Detailed Description

Definition at line 33 of file securedht.h.

Member Typedef Documentation

◆ Config

Definition at line 38 of file securedht.h.

◆ SignatureCheckCallback

typedef std::function<void(bool)> dht::SecureDht::SignatureCheckCallback

Definition at line 36 of file securedht.h.

Constructor & Destructor Documentation

◆ SecureDht()

dht::SecureDht::SecureDht ( std::unique_ptr< DhtInterface > dht,
Config config,
IdentityAnnouncedCb iacb = {},
const std::shared_ptr< Logger > & l = {} )

s, s6: bound socket descriptors for IPv4 and IPv6, respectively. For the Dht to be initialised, at least one of them must be >= 0. id: the identity to use for the crypto layer and to compute our own hash on the Dht.

Member Function Documentation

◆ addBootstrap()

void dht::SecureDht::addBootstrap ( const std::string & host,
const std::string & service )
inlineoverridevirtual

Reimplemented from dht::DhtInterface.

Definition at line 234 of file securedht.h.

◆ cancelListen()

bool dht::SecureDht::cancelListen ( const InfoHash & h,
size_t token )
inlineoverridevirtual

Implements dht::DhtInterface.

Definition at line 309 of file securedht.h.

◆ cancelPut()

bool dht::SecureDht::cancelPut ( const InfoHash & ,
const Value::Id &  )
inlineoverridevirtual

Stop any put/announce operation at the given location, for the value with the given id.

Implements dht::DhtInterface.

Definition at line 300 of file securedht.h.

◆ clearBootstrap()

void dht::SecureDht::clearBootstrap ( )
inlineoverridevirtual

Reimplemented from dht::DhtInterface.

Definition at line 237 of file securedht.h.

◆ connectivityChanged() [1/2]

void dht::SecureDht::connectivityChanged ( )
inlineoverridevirtual

Implements dht::DhtInterface.

Definition at line 315 of file securedht.h.

◆ connectivityChanged() [2/2]

void dht::SecureDht::connectivityChanged ( sa_family_t )
inlineoverridevirtual

Inform the DHT of lower-layer connectivity changes. This will cause the DHT to assume a public IP address change. The DHT will recontact neighbor nodes, re-register for listen ops etc.

Implements dht::DhtInterface.

Definition at line 312 of file securedht.h.

◆ dumpTables()

void dht::SecureDht::dumpTables ( ) const
inlineoverridevirtual

Implements dht::DhtInterface.

Definition at line 162 of file securedht.h.

◆ exportNodes()

std::vector< NodeExport > dht::SecureDht::exportNodes ( ) const
inlineoverridevirtual

Get the list of good nodes for local storage saving purposes The list is ordered to minimize the back-to-work delay.

Implements dht::DhtInterface.

Definition at line 183 of file securedht.h.

◆ exportValues()

std::vector< ValuesExport > dht::SecureDht::exportValues ( ) const
inlineoverridevirtual

Implements dht::DhtInterface.

Definition at line 186 of file securedht.h.

◆ forwardAllMessages()

void dht::SecureDht::forwardAllMessages ( bool forward)
inline

Definition at line 319 of file securedht.h.

◆ get() [1/4]

void dht::SecureDht::get ( const InfoHash & id,
GetCallback cb,
DoneCallback donecb = {},
Value::Filter && = {},
Where && w = {} )
overridevirtual

"Secure" get(), that will check the signature of signed data, and decrypt encrypted data. If the signature can't be checked, or if the data can't be decrypted, it is not returned. Public, non-signed & non-encrypted data is retransmitted as-is.

Implements dht::DhtInterface.

◆ get() [2/4]

void dht::SecureDht::get ( const InfoHash & id,
GetCallback cb,
DoneCallbackSimple donecb = {},
Value::Filter && f = {},
Where && w = {} )
inlineoverridevirtual

Implements dht::DhtInterface.

Definition at line 94 of file securedht.h.

◆ get() [3/4]

void dht::SecureDht::get ( const InfoHash & key,
GetCallbackSimple cb,
DoneCallback donecb = {},
Value::Filter && f = {},
Where && w = {} )
inlineoverridevirtual

Implements dht::DhtInterface.

Definition at line 97 of file securedht.h.

◆ get() [4/4]

void dht::SecureDht::get ( const InfoHash & key,
GetCallbackSimple cb,
DoneCallbackSimple donecb,
Value::Filter && f = {},
Where && w = {} )
inlineoverridevirtual

Implements dht::DhtInterface.

Definition at line 100 of file securedht.h.

◆ getConfig()

static dht::Config dht::SecureDht::getConfig ( const SecureDht::Config & conf)
inlinestatic

Definition at line 40 of file securedht.h.

◆ getId()

InfoHash dht::SecureDht::getId ( ) const
inline

Definition at line 58 of file securedht.h.

◆ getLocal()

std::vector< Sp< Value > > dht::SecureDht::getLocal ( const InfoHash & key,
const Value::Filter & f = {} ) const
inlineoverridevirtual

Get locally stored data for the given hash.

Implements dht::DhtInterface.

Definition at line 255 of file securedht.h.

◆ getLocalById()

Sp< Value > dht::SecureDht::getLocalById ( const InfoHash & key,
Value::Id vid ) const
inlineoverridevirtual

Get locally stored data for the given key and value id.

Implements dht::DhtInterface.

Definition at line 258 of file securedht.h.

◆ getLongId()

PkId dht::SecureDht::getLongId ( ) const
inline

Definition at line 61 of file securedht.h.

◆ getNodeId()

const InfoHash & dht::SecureDht::getNodeId ( ) const
inlineoverridevirtual

Get the ID of the DHT node.

Implements dht::DhtInterface.

Definition at line 165 of file securedht.h.

◆ getNodeMessageStats()

std::vector< unsigned > dht::SecureDht::getNodeMessageStats ( bool in = false)
inlineoverridevirtual

Implements dht::DhtInterface.

Definition at line 195 of file securedht.h.

◆ getNodesStats()

NodeStats dht::SecureDht::getNodesStats ( sa_family_t af) const
inlineoverridevirtual

Implements dht::DhtInterface.

Definition at line 192 of file securedht.h.

◆ getPublicAddress()

std::vector< SockAddr > dht::SecureDht::getPublicAddress ( sa_family_t family = 0)
inlineoverridevirtual

Implements dht::DhtInterface.

Definition at line 207 of file securedht.h.

◆ getPublicKey()

Sp< crypto::PublicKey > dht::SecureDht::getPublicKey ( ) const
inline

Definition at line 64 of file securedht.h.

◆ getPut() [1/2]

std::vector< Sp< Value > > dht::SecureDht::getPut ( const InfoHash & ) const
inlineoverridevirtual

Get data currently being put at the given hash.

Implements dht::DhtInterface.

Definition at line 294 of file securedht.h.

◆ getPut() [2/2]

Sp< Value > dht::SecureDht::getPut ( const InfoHash & ,
const Value::Id &  ) const
inlineoverridevirtual

Get data currently being put at the given hash with the given id.

Implements dht::DhtInterface.

Definition at line 297 of file securedht.h.

◆ getRoutingTablesLog()

std::string dht::SecureDht::getRoutingTablesLog ( sa_family_t af) const
inlineoverridevirtual

Implements dht::DhtInterface.

Definition at line 198 of file securedht.h.

◆ getSearchesLog()

std::string dht::SecureDht::getSearchesLog ( sa_family_t af) const
inlineoverridevirtual

Implements dht::DhtInterface.

Definition at line 201 of file securedht.h.

◆ getSearchLog()

std::string dht::SecureDht::getSearchLog ( const InfoHash & h,
sa_family_t af = AF_UNSPEC ) const
inlineoverridevirtual

Implements dht::DhtInterface.

Definition at line 204 of file securedht.h.

◆ getSocket()

net::DatagramSocket * dht::SecureDht::getSocket ( ) const
inlineoverridevirtual

Reimplemented from dht::DhtInterface.

Definition at line 225 of file securedht.h.

◆ getStatus() [1/2]

NodeStatus dht::SecureDht::getStatus ( ) const
inlineoverridevirtual

Implements dht::DhtInterface.

Definition at line 222 of file securedht.h.

◆ getStatus() [2/2]

NodeStatus dht::SecureDht::getStatus ( sa_family_t af) const
inlineoverridevirtual

Implements dht::DhtInterface.

Definition at line 219 of file securedht.h.

◆ getStorageLimit()

size_t dht::SecureDht::getStorageLimit ( ) const
inlineoverridevirtual

Implements dht::DhtInterface.

Definition at line 179 of file securedht.h.

◆ getStorageLog() [1/2]

std::string dht::SecureDht::getStorageLog ( ) const
inlineoverridevirtual

Implements dht::DhtInterface.

Definition at line 170 of file securedht.h.

◆ getStorageLog() [2/2]

std::string dht::SecureDht::getStorageLog ( const InfoHash & h) const
inlineoverridevirtual

Implements dht::DhtInterface.

Definition at line 173 of file securedht.h.

◆ getStoreSize()

std::pair< size_t, size_t > dht::SecureDht::getStoreSize ( ) const
inlineoverridevirtual

Returns the total memory usage of stored values and the number of stored values.

Implements dht::DhtInterface.

Definition at line 167 of file securedht.h.

◆ getType()

const ValueType & dht::SecureDht::getType ( ValueType::Id type_id) const
inlineoverridevirtual

Implements dht::DhtInterface.

Definition at line 231 of file securedht.h.

◆ importValues()

void dht::SecureDht::importValues ( const std::vector< ValuesExport > & v)
inlineoverridevirtual

Implements dht::DhtInterface.

Definition at line 189 of file securedht.h.

◆ insertNode() [1/2]

void dht::SecureDht::insertNode ( const InfoHash & id,
const SockAddr &  )
inlineoverridevirtual

Insert a node in the main routing table. The node is not pinged, so this should be used to bootstrap efficiently from previously known nodes.

Implements dht::DhtInterface.

Definition at line 240 of file securedht.h.

◆ insertNode() [2/2]

void dht::SecureDht::insertNode ( const NodeExport & n)
inlineoverridevirtual

Implements dht::DhtInterface.

Definition at line 243 of file securedht.h.

◆ isRunning()

bool dht::SecureDht::isRunning ( sa_family_t af = 0) const
inlineoverridevirtual

Returns true if the node is running (have access to an open socket).

af: address family. If non-zero, will return true if the node is running for the provided family.

Implements dht::DhtInterface.

Definition at line 228 of file securedht.h.

◆ listen() [1/3]

size_t dht::SecureDht::listen ( const InfoHash & ,
GetCallback ,
Value::Filter = {},
Where w = {} )
overridevirtual

Listen on the network for any changes involving a specified hash. The node will register to receive updates from relevent nodes when new values are added or removed.

Returns
a token to cancel the listener later.

Implements dht::DhtInterface.

◆ listen() [2/3]

size_t dht::SecureDht::listen ( const InfoHash & key,
GetCallbackSimple cb,
Value::Filter f = {},
Where w = {} )
inlineoverridevirtual

Implements dht::DhtInterface.

Definition at line 306 of file securedht.h.

◆ listen() [3/3]

size_t dht::SecureDht::listen ( const InfoHash & key,
ValueCallback ,
Value::Filter = {},
Where = {} )
overridevirtual

Implements dht::DhtInterface.

◆ periodic() [1/2]

time_point dht::SecureDht::periodic ( const uint8_t * buf,
size_t buflen,
const sockaddr * from,
socklen_t fromlen,
const time_point & now )
inlineoverridevirtual

Implements dht::DhtInterface.

Definition at line 213 of file securedht.h.

◆ periodic() [2/2]

time_point dht::SecureDht::periodic ( const uint8_t * buf,
size_t buflen,
SockAddr sa,
const time_point & now )
inlineoverridevirtual

Implements dht::DhtInterface.

Definition at line 210 of file securedht.h.

◆ pingNode()

void dht::SecureDht::pingNode ( SockAddr sa,
DoneCallbackSimple && cb = {} )
inlineoverridevirtual

Implements dht::DhtInterface.

Definition at line 246 of file securedht.h.

◆ pushNotificationReceived()

void dht::SecureDht::pushNotificationReceived ( const std::map< std::string, std::string > & notification)
inlineoverridevirtual

Call linked callback with push_notification

Parameters
notificationto process

Implements dht::DhtInterface.

Definition at line 331 of file securedht.h.

◆ put() [1/4]

void dht::SecureDht::put ( const InfoHash & key,
const Sp< Value > & v,
DoneCallbackSimple cb,
time_point created = time_point::max(),
bool permanent = false )
inlineoverridevirtual

Implements dht::DhtInterface.

Definition at line 269 of file securedht.h.

◆ put() [2/4]

void dht::SecureDht::put ( const InfoHash & key,
Sp< Value > ,
DoneCallback cb = nullptr,
time_point created = time_point::max(),
bool permanent = false )
inlineoverridevirtual

Announce a value on all available protocols (IPv4, IPv6).

The operation will start as soon as the node is connected to the network. The done callback will be called once, when the first announce succeeds, or fails.

Implements dht::DhtInterface.

Definition at line 261 of file securedht.h.

◆ put() [3/4]

void dht::SecureDht::put ( const InfoHash & key,
Value && v,
DoneCallback cb = nullptr,
time_point created = time_point::max(),
bool permanent = false )
inlineoverridevirtual

Implements dht::DhtInterface.

Definition at line 278 of file securedht.h.

◆ put() [4/4]

void dht::SecureDht::put ( const InfoHash & key,
Value && v,
DoneCallbackSimple cb,
time_point created = time_point::max(),
bool permanent = false )
inlineoverridevirtual

Implements dht::DhtInterface.

Definition at line 286 of file securedht.h.

◆ putEncrypted() [1/3]

void dht::SecureDht::putEncrypted ( const InfoHash & hash,
const crypto::PublicKey & to,
Value && v,
DoneCallback callback,
bool permanent = false )
inline

Definition at line 122 of file securedht.h.

◆ putEncrypted() [2/3]

void dht::SecureDht::putEncrypted ( const InfoHash & hash,
const InfoHash & to,
Sp< Value > val,
DoneCallback callback,
bool permanent = false )

Will sign the data using our private key, encrypt it using the recipient' public key, and put it in the DHT. The operation will be immediate if the recipient' public key is known (otherwise it will be retrived first).

◆ putEncrypted() [3/3]

void dht::SecureDht::putEncrypted ( const InfoHash & hash,
const InfoHash & to,
Value && v,
DoneCallback callback,
bool permanent = false )
inline

Definition at line 118 of file securedht.h.

◆ putSigned() [1/2]

void dht::SecureDht::putSigned ( const InfoHash & hash,
Sp< Value > val,
DoneCallback callback,
bool permanent = false )

Will take ownership of the value, sign it using our private key and put it in the DHT.

◆ putSigned() [2/2]

void dht::SecureDht::putSigned ( const InfoHash & hash,
Value && v,
DoneCallback callback,
bool permanent = false )
inline

Definition at line 108 of file securedht.h.

◆ query() [1/2]

void dht::SecureDht::query ( const InfoHash & key,
QueryCallback cb,
DoneCallback done_cb = {},
Query && q = {} )
inlineoverridevirtual

Similar to Dht::get, but sends a Query to filter data remotely.

Parameters
keythe key for which to query data for.
cba function called when new values are found on the network. It should return false to stop the operation.
done_cba function called when the operation is complete. cb and done_cb won't be called again afterward.
qa query used to filter values on the remotes before they send a response.

Implements dht::DhtInterface.

Definition at line 249 of file securedht.h.

◆ query() [2/2]

void dht::SecureDht::query ( const InfoHash & key,
QueryCallback cb,
DoneCallbackSimple done_cb = {},
Query && q = {} )
inlineoverridevirtual

Implements dht::DhtInterface.

Definition at line 252 of file securedht.h.

◆ registerInsecureType()

void dht::SecureDht::registerInsecureType ( const ValueType & type)
inline

Definition at line 83 of file securedht.h.

◆ registerType() [1/2]

void dht::SecureDht::registerType ( const ValueType & type)
inlineoverridevirtual

Implements dht::DhtInterface.

Definition at line 75 of file securedht.h.

◆ registerType() [2/2]

void dht::SecureDht::registerType ( ValueType && type)
inline

Definition at line 79 of file securedht.h.

◆ secureType()

ValueType dht::SecureDht::secureType ( const ValueType & type)
inline

Definition at line 70 of file securedht.h.

◆ setLocalCertificateStore()

void dht::SecureDht::setLocalCertificateStore ( CertificateStoreQuery && query_method)
inline

Allows to set a custom callback called by the library to find a locally-stored certificate. The search key used is the public key ID, so there may be multiple certificates retured, signed with the same private key.

Definition at line 149 of file securedht.h.

◆ setLogFilter()

void dht::SecureDht::setLogFilter ( const InfoHash & f)
inlineoverridevirtual

Only print logs related to the given InfoHash (if given), or disable filter (if zeroes).

Reimplemented from dht::DhtInterface.

Definition at line 348 of file securedht.h.

◆ setLogger() [1/2]

void dht::SecureDht::setLogger ( const Logger & logger)
inlineoverridevirtual

Reimplemented from dht::DhtInterface.

Definition at line 335 of file securedht.h.

◆ setLogger() [2/2]

void dht::SecureDht::setLogger ( const std::shared_ptr< Logger > & logger)
inlineoverridevirtual

Reimplemented from dht::DhtInterface.

Definition at line 340 of file securedht.h.

◆ setOnPublicAddressChanged()

void dht::SecureDht::setOnPublicAddressChanged ( PublicAddressChangedCb cb)
inlineoverridevirtual

Reimplemented from dht::DhtInterface.

Definition at line 152 of file securedht.h.

◆ setPushNotificationToken()

void dht::SecureDht::setPushNotificationToken ( const std::string & token = "")
inlineoverridevirtual

Reimplemented from dht::DhtInterface.

Definition at line 323 of file securedht.h.

◆ setStorageLimit()

void dht::SecureDht::setStorageLimit ( size_t limit = DEFAULT_STORAGE_LIMIT)
inlineoverridevirtual

Set the in-memory storage limit in bytes

Implements dht::DhtInterface.

Definition at line 176 of file securedht.h.

◆ shutdown()

void dht::SecureDht::shutdown ( ShutdownCallback cb,
bool stop = false )
inlineoverridevirtual

SecureDht to Dht proxy

Implements dht::DhtInterface.

Definition at line 159 of file securedht.h.

◆ sign()

void dht::SecureDht::sign ( Value & v) const

Take ownership of the value and sign it using our private key.

◆ updateStatus()

NodeStatus dht::SecureDht::updateStatus ( sa_family_t af)
inlineoverridevirtual

Get the current status of the node for the given family.

Reimplemented from dht::DhtInterface.

Definition at line 216 of file securedht.h.


The documentation for this class was generated from the following file: