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
22958342
Commit
22958342
authored
8 years ago
by
Adrien Béraud
Browse files
Options
Downloads
Patches
Plain Diff
headers: move inclusion of networking APIs to Infohash
parent
e9094f8f
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
include/opendht/infohash.h
+13
-6
13 additions, 6 deletions
include/opendht/infohash.h
include/opendht/node.h
+0
-2
0 additions, 2 deletions
include/opendht/node.h
include/opendht/value.h
+0
-12
0 additions, 12 deletions
include/opendht/value.h
with
13 additions
and
20 deletions
include/opendht/infohash.h
+
13
−
6
View file @
22958342
...
...
@@ -21,6 +21,18 @@
#include
<msgpack.hpp>
#ifndef _WIN32
#include
<netinet/in.h>
#include
<netdb.h>
#ifdef __ANDROID__
typedef
uint16_t
in_port_t
;
#endif
#else
#include
<ws2tcpip.h>
typedef
uint16_t
sa_family_t
;
typedef
uint16_t
in_port_t
;
#endif
#include
<iostream>
#include
<iomanip>
#include
<array>
...
...
@@ -197,12 +209,7 @@ public:
};
static
constexpr
InfoHash
zeroes
{};
static
constexpr
InfoHash
ones
=
{
std
::
array
<
uint8_t
,
HASH_LEN
>
{{
0xFF
,
0xFF
,
0xFF
,
0xFF
,
0xFF
,
0xFF
,
0xFF
,
0xFF
,
0xFF
,
0xFF
,
0xFF
,
0xFF
,
0xFF
,
0xFF
,
0xFF
,
0xFF
,
0xFF
,
0xFF
,
0xFF
,
0xFF
}}};
static
constexpr
const
InfoHash
zeroes
{};
struct
NodeExport
{
InfoHash
id
;
...
...
This diff is collapsed.
Click to expand it.
include/opendht/node.h
+
0
−
2
View file @
22958342
...
...
@@ -24,8 +24,6 @@
#include
"utils.h"
#include
"infohash.h"
#include
<arpa/inet.h>
#include
<list>
namespace
dht
{
...
...
This diff is collapsed.
Click to expand it.
include/opendht/value.h
+
0
−
12
View file @
22958342
...
...
@@ -26,18 +26,6 @@
#include
<msgpack.hpp>
#ifndef _WIN32
#include
<netinet/in.h>
#include
<netdb.h>
#ifdef __ANDROID__
typedef
uint16_t
in_port_t
;
#endif
#else
#include
<ws2tcpip.h>
typedef
uint16_t
sa_family_t
;
typedef
uint16_t
in_port_t
;
#endif
#include
<string>
#include
<sstream>
#include
<bitset>
...
...
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