mirror of
https://github.com/savoirfairelinux/opendht.git
synced 2026-11-08 04:21:51 +00:00
python: add bindings for network, maintain_storage
This commit is contained in:
1 parent
ac65ca5177
commit
43b181ebbf
2 files changed
+6
No files matched your search
@@ -269,6 +269,10 @@ cdef class DhtConfig(object):
|
||||
self._config.dht_config.node_config.is_bootstrap = bootstrap
|
||||
def setNodeId(self, InfoHash id):
|
||||
self._config.dht_config.node_config.node_id = id._infohash
|
||||
def setNetwork(self, unsigned netid):
|
||||
self._config.dht_config.node_config.network = netid
|
||||
def setMaintainStorage(self, bool maintain_storage):
|
||||
self._config.dht_config.node_config.maintain_storage = maintain_storage
|
||||
|
||||
cdef class DhtRunner(_WithID):
|
||||
cdef cpp.shared_ptr[cpp.DhtRunner] thisptr
|
||||
|
||||
@@ -123,7 +123,9 @@ cdef extern from "opendht/callbacks.h" namespace "dht":
|
||||
|
||||
cppclass Config:
|
||||
InfoHash node_id
|
||||
uint32_t network
|
||||
bool is_bootstrap
|
||||
bool maintain_storage
|
||||
cppclass SecureDhtConfig:
|
||||
Config node_config
|
||||
Identity id
|
||||
|
||||
Reference in new issue
Block a user