GithubHelp home page GithubHelp logo

Comments (4)

 avatar commented on May 19, 2024

这个跟udp协议本身有关,调用udp的send,不会出现返回值为EAGAIN的情况,当udp的send被过于频繁的调用,底层协议不能够把所有数据都发送出去时,数据包会被直接丢弃。因此使用udp协议,需要自己做流控

from handy.

happyxgang avatar happyxgang commented on May 19, 2024

tcp返回eagain的时候包可能只发送了部分,如果不在传输层做保存发送会让业务侧出现混乱。

而udp是整包一次性发送成功或失败,且本身协议不保证可靠传输。因此当整个包发送失败的情况下,直接交由业务来做流控更合理一些。

不知道这么理解合不合适。

from handy.

 avatar commented on May 19, 2024

嗯嗯,是这个过程

from handy.

happyxgang avatar happyxgang commented on May 19, 2024

多谢大大耐心回复

from handy.

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.