Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
opendht
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Model registry
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
savoirfairelinux
opendht
Commits
43b181eb
Commit
43b181eb
authored
8 years ago
by
Adrien Béraud
Browse files
Options
Downloads
Patches
Plain Diff
python: add bindings for network, maintain_storage
parent
ac65ca51
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
python/opendht.pyx
+4
-0
4 additions, 0 deletions
python/opendht.pyx
python/opendht_cpp.pxd
+2
-0
2 additions, 0 deletions
python/opendht_cpp.pxd
with
6 additions
and
0 deletions
python/opendht.pyx
+
4
−
0
View file @
43b181eb
...
@@ -269,6 +269,10 @@ cdef class DhtConfig(object):
...
@@ -269,6 +269,10 @@ cdef class DhtConfig(object):
self
.
_config
.
dht_config
.
node_config
.
is_bootstrap
=
bootstrap
self
.
_config
.
dht_config
.
node_config
.
is_bootstrap
=
bootstrap
def
setNodeId
(
self
,
InfoHash
id
):
def
setNodeId
(
self
,
InfoHash
id
):
self
.
_config
.
dht_config
.
node_config
.
node_id
=
id
.
_infohash
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
class
DhtRunner
(
_WithID
):
cdef
cpp
.
shared_ptr
[
cpp
.
DhtRunner
]
thisptr
cdef
cpp
.
shared_ptr
[
cpp
.
DhtRunner
]
thisptr
...
...
This diff is collapsed.
Click to expand it.
python/opendht_cpp.pxd
+
2
−
0
View file @
43b181eb
...
@@ -123,7 +123,9 @@ cdef extern from "opendht/callbacks.h" namespace "dht":
...
@@ -123,7 +123,9 @@ cdef extern from "opendht/callbacks.h" namespace "dht":
cppclass
Config
:
cppclass
Config
:
InfoHash
node_id
InfoHash
node_id
uint32_t
network
bool
is_bootstrap
bool
is_bootstrap
bool
maintain_storage
cppclass
SecureDhtConfig
:
cppclass
SecureDhtConfig
:
Config
node_config
Config
node_config
Identity
id
Identity
id
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment