diff --git a/python/opendht.pyx b/python/opendht.pyx index 2ebbd70103aac6e5eda33da1b4e7fb0396381810..fcf9ddd63aec4dc633b4fda911e40cb802b69145 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 d2f53026bb35c936a2ff84b2b10b45f40ca254a3..80e73186dc34dc59966a17faa43e42f49dbc5294 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