Comments (4)
Hi,
谢谢你提的这些建议, 能提出这些建议说明你认真读代码了。但是根据协议要处理一些很细节的东西,所以有的代码看起来不是太好,但也是没法避免的,当然也有可能是我水平不够。要不你提个PR狠狠地甩我一脸告诉我怎么样做才是“写程序要逻辑干净,表达清楚意思“,才能让你好受点?
谢谢。
from dht.
@yqsy 有什么进展吗?
from dht.
https://github.com/yqsy/recipes/tree/master/dht
我正在写中,还差路由表,实现kademlia算法..正在研究中. 你有空可以看看我写的,我们交流下.
上面那个函数我的实现是 func (mg *MetaGetter) GetMetadata
逻辑就是很清楚的1次握手,2次握手,拿2次握手的应答值去做piece请求.
做每个事情都是一个小函数,一个维度上. for循环一个屏幕展示清楚,不会超过三四十行,不让人的逻辑产生大的跳跃,产生额外的推理.
from dht.
狠狠地甩你一脸...😄
from dht.
Related Issues (20)
- 阿里云上接受不到数据, 通过日志分析绝大多数错误是decode
- 如何加入dht网络? HOT 5
- routingtable:getTopK HOT 1
- find_node no response HOT 7
- 关于节点插入时bucket分裂问题 HOT 1
- 端口占用的问题.. HOT 5
- Spider Shows no result , waits almost 15 minutes for one metadata HOT 2
- 6060端口的作用是? HOT 2
- fastXORBytes will panic on some architectures due to unaligned access HOT 1
- 内网运行,为什么其他的dht项目包括Js等都收不到udp回复,而这个服务就能收到呢 HOT 1
- Spider needs fixing. HOT 5
- arm64平台无法编译
- Potential panic caused by illegal incoming packet
- 请问如何在本地调试会方便一些 HOT 1
- bthub.io HOT 2
- Is this project still maintained? HOT 1
- 这个程序怎么搜索文件? HOT 1
- 访问 bittorrent / utorrent.com 总是超时?
- ipv6优先支持 HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from dht.