DHT的C++实现

Ale*_*nko 5 c++ cross-platform dht

我正在寻找C/C++中Kademlia DHT 的开源实现。它必须是轻量级和跨平台的(win/linux/mac)。

它必须能够将信息发布到 DHT 并检索它。

abe*_*aud 5

OpenDHT是 C++11 中的轻量级 Kademlia DHT。API 非常简单:

dht::DhtRunner node;

// Launch a dht node on a new thread, using a
// generated RSA key pair, and listen on port 4222.
node.run(4222, dht::crypto::generateIdentity(), true);

// Join the network through any running node,
// here using a known bootstrap node.
node.bootstrap("bootstrap.jami.net", "4222");

// put some data on the dht
std::vector<uint8_t> some_data(5, 10);
node.put("unique_key", some_data);
Run Code Online (Sandbox Code Playgroud)

它支持在 OS X、Linux 和 Windows 上使用 LLVM 或 GCC 进行编译。


Kir*_*sky 1

maidsafe-dht有什么问题吗?