mirror of
https://github.com/savoirfairelinux/opendht.git
synced 2026-11-08 12:28:42 +00:00
dht: add message counting
This commit is contained in:
1 parent
80363a9343
commit
eea097961a
5 files changed
+37
No files matched your search
@@ -269,6 +269,12 @@ cdef class DhtRunner(_WithID):
|
||||
return self.thisptr.getRoutingTablesLog(af).decode()
|
||||
def getSearchesLog(self, cpp.sa_family_t af):
|
||||
return self.thisptr.getSearchesLog(af).decode()
|
||||
def getNodeMessageStats(self):
|
||||
stats = []
|
||||
cdef cpp.vector[unsigned] res = self.thisptr.getNodeMessageStats(False)
|
||||
for n in res:
|
||||
stats.append(n)
|
||||
return stats
|
||||
|
||||
def get(self, InfoHash key, get_cb=None, done_cb=None):
|
||||
"""Retreive values associated with a key on the DHT.
|
||||
|
||||
@@ -127,5 +127,6 @@ cdef extern from "opendht/dhtrunner.h" namespace "dht":
|
||||
void put(InfoHash key, shared_ptr[Value] val, Dht.DoneCallback done_cb)
|
||||
ListenToken listen(InfoHash key, Dht.GetCallback get_cb)
|
||||
void cancelListen(InfoHash key, SharedListenToken token)
|
||||
vector[unsigned] getNodeMessageStats(bool i)
|
||||
|
||||
ctypedef DhtRunner.Config Config
|
||||
Reference in new issue
Block a user