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
76f0672e
Commit
76f0672e
authored
5 years ago
by
Adrien Béraud
Browse files
Options
Downloads
Patches
Plain Diff
context: add statusCallback, certificateStore
parent
ff6be819
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
include/opendht/dhtrunner.h
+2
-0
2 additions, 0 deletions
include/opendht/dhtrunner.h
src/dhtrunner.cpp
+6
-0
6 additions, 0 deletions
src/dhtrunner.cpp
with
8 additions
and
0 deletions
include/opendht/dhtrunner.h
+
2
−
0
View file @
76f0672e
...
...
@@ -66,6 +66,8 @@ public:
struct
Context
{
std
::
unique_ptr
<
Logger
>
logger
{};
std
::
shared_ptr
<
PeerDiscovery
>
peerDiscovery
{};
StatusCallback
statusChangedCallback
{};
CertificateStoreQuery
certificateStore
{};
Context
()
{}
};
...
...
This diff is collapsed.
Click to expand it.
src/dhtrunner.cpp
+
6
−
0
View file @
76f0672e
...
...
@@ -114,6 +114,12 @@ DhtRunner::run(const SockAddr& local4, const SockAddr& local6, const DhtRunner::
if
(
context
.
logger
and
dht_via_proxy_
)
{
dht_via_proxy_
->
setLogger
(
*
context
.
logger
);
}
statusCb
=
std
::
move
(
context
.
statusChangedCallback
);
if
(
context
.
certificateStore
)
{
dht_
->
setLocalCertificateStore
(
std
::
move
(
context
.
certificateStore
));
if
(
dht_via_proxy_
)
dht_via_proxy_
->
setLocalCertificateStore
(
std
::
move
(
context
.
certificateStore
));
}
running
=
true
;
if
(
not
config
.
threaded
)
...
...
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