diff --git a/python/opendht.pyx b/python/opendht.pyx index 2ebbd701..fcf9ddd6 100644 --- a/python/opendht.pyx +++ b/python/opendht.pyx @@ -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 diff --git a/python/opendht_cpp.pxd b/python/opendht_cpp.pxd index d2f53026..80e73186 100644 --- a/python/opendht_cpp.pxd +++ b/python/opendht_cpp.pxd @@ -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