Git Product home page Git Product logo

Comments (5)

Barcelonao avatar Barcelonao commented on May 17, 2024

原谅我这烂语言组织能力
简单的说 我Client发送的端口 必须和 Server端监听端口 一致吗?

from dht.

shiyanhui avatar shiyanhui commented on May 17, 2024

没有所谓的client端, 只有server端(DHT server), 其他DHT节点获取到你的ip和端口是你的server端.

from dht.

Barcelonao avatar Barcelonao commented on May 17, 2024

嗯嗯 应该是我的描述有误 Client和Server 应该指的是 UDP
我需要不断的向自己的好友列表和查询好友列表后返回的节点 主动发送 find_node请求
这时候发送数据包的UDP 的Client 的发送端口 应该就是 我UDP Server接收端口
那这样的话 同时间运行的话 就会出现端口占用的问题
请问 是哪一个环节我的理解出现了偏差?

from dht.

shiyanhui avatar shiyanhui commented on May 17, 2024

这时候发送数据包的UDP 的Client 的发送端口 应该就是 我UDP Server接收端口

发送UDP请求的时候不用指定client端口, 系统会自动为你分配. UDP相关知识你可能忘了, 建议复习下 :)

from dht.

Barcelonao avatar Barcelonao commented on May 17, 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.