Code Monkey home page Code Monkey logo

Comments (4)

shiyanhui avatar shiyanhui commented on July 28, 2024

Hi,

谢谢你提的这些建议, 能提出这些建议说明你认真读代码了。但是根据协议要处理一些很细节的东西,所以有的代码看起来不是太好,但也是没法避免的,当然也有可能是我水平不够。要不你提个PR狠狠地甩我一脸告诉我怎么样做才是“写程序要逻辑干净,表达清楚意思“,才能让你好受点?

谢谢。

from dht.

shiyanhui avatar shiyanhui commented on July 28, 2024

@yqsy 有什么进展吗?

from dht.

yqsy avatar yqsy commented on July 28, 2024

https://github.com/yqsy/recipes/tree/master/dht

我正在写中,还差路由表,实现kademlia算法..正在研究中. 你有空可以看看我写的,我们交流下.

上面那个函数我的实现是 func (mg *MetaGetter) GetMetadata

逻辑就是很清楚的1次握手,2次握手,拿2次握手的应答值去做piece请求.

做每个事情都是一个小函数,一个维度上. for循环一个屏幕展示清楚,不会超过三四十行,不让人的逻辑产生大的跳跃,产生额外的推理.

from dht.

LiMoMoMo avatar LiMoMoMo commented on July 28, 2024

狠狠地甩你一脸...😄

from dht.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.