DHT的跨平台C++实现
cross platform - C++ implementation of DHT
我正在寻找C/C++中Kademlia DHT的开源实现。它必须是轻量级和跨平台的(win/linux/mac)。
它必须能够将信息发布到DHT并进行检索。
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);
它支持在OSX、Linux和Windows上使用LLVM或GCC进行编译。
LibTorrent的Kademlia DHT是用C++编写的,并且有很好的文档记录
以下是具有不可变和可变get/put操作的示例代码:https://github.com/arvidn/libtorrent/blob/master/tools/dht_put.cpp
maidsafe dht有什么问题?
您可以尝试retroshare使用的bitdht。
我发现了一个BitTorrent DHT库,由Transmission使用。它是用纯C编写的,但从C++中可以很容易地使用它。
我正在我的C++项目中使用它。它运行良好,但需要外部加密哈希和随机化函数。
相关文章:
- 如果没有malloc,链表实现将失败
- 如何在c++中实现处理器调度模拟器
- 如何在c++中使用引用实现类似python的行为
- 实现无开销push_back的最佳方法是什么
- 使用简单类型列表实现的指数编译时间.为什么
- 如何在BST的这个简单递归实现中消除警告
- 实现一个在集合上迭代的模板函数
- 我应该实现右值推送功能吗?我应该使用std::move吗
- 如何正确实现和访问运算符的各种自定义枚举器
- C++Union/Struct位域的实现和可移植性
- 这个极客对极客的trie实现是否存在内存泄漏问题
- 在c++中实现LinkedList时,应出现未处理的错误
- 为左值和右值的包装器实现C++范围
- 使用模板进行堆栈实现; "name followed by :: must be a class or namespace"
- 使用GSoap实现ONVIF
- 在用于格式4的arm模拟器中实现功能时的一个问题
- 用于AVX的ln(x)的实现,m256
- 用常见虚拟函数实现的任意组合来实现派生类的正确方法是什么
- 在C++中,如何在类和函数(可能是模板化的)的头中编写完整的实现
- std::random_device是如何实现的