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
5ca7b8d6
Commit
5ca7b8d6
authored
1 year ago
by
Adrien Béraud
Browse files
Options
Downloads
Patches
Plain Diff
python: add cancelPut
parent
805cdbed
Branches
Branches containing commit
Tags
v3.1
Tags containing commit
No related merge requests found
Changes
2
Hide 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
+1
-0
1 addition, 0 deletions
python/opendht_cpp.pxd
with
5 additions
and
0 deletions
python/opendht.pyx
+
4
−
0
View file @
5ca7b8d6
...
...
@@ -636,6 +636,10 @@ cdef class DhtRunner(_WithID):
while
pending
>
0
:
lock
.
wait
()
return
ok
def
cancelPut
(
self
,
InfoHash
key
,
Value
val
):
self
.
thisptr
.
get
().
cancelPut
(
key
.
_infohash
,
val
.
_value
)
def
listen
(
self
,
InfoHash
key
,
value_cb
):
t
=
ListenToken
()
t
.
_h
=
key
.
_infohash
...
...
This diff is collapsed.
Click to expand it.
python/opendht_cpp.pxd
+
1
−
0
View file @
5ca7b8d6
...
...
@@ -267,6 +267,7 @@ cdef extern from "opendht/dhtrunner.h" namespace "dht":
string
getSearchesLog
(
sa_family_t
af
)
const
void
get
(
InfoHash
key
,
GetCallback
get_cb
,
DoneCallback
done_cb
,
nullptr_t
f
,
Where
w
)
void
put
(
InfoHash
key
,
shared_ptr
[
Value
]
val
,
DoneCallback
done_cb
,
time_point
created
,
bool
permanent
)
void
cancelPut
(
InfoHash
key
,
shared_ptr
[
Value
]
val
)
ListenToken
listen
(
InfoHash
key
,
ValueCallback
get_cb
)
void
cancelListen
(
InfoHash
key
,
SharedListenToken
token
)
vector
[
unsigned
]
getNodeMessageStats
(
bool
i
)
...
...
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