Code Monkey home page Code Monkey logo

Comments (4)

skywind3000 avatar skywind3000 commented on June 8, 2024

什么叫做 “主动丢包” ?KCP 自己不会丢包,哪里来的主动?

from kcp.

firstimes avatar firstimes commented on June 8, 2024

就是之前讨论过的,在一些对实时性要求比较高的应用场景。如果发送的数据超过一定时间再发送过去已经没有意义了,所以就需要从待发送队列里面丢弃。比如在线实时通话,如果我发送一个通话请求信令给你,因为网络原因这个信令当时没有发出去,一个小时之后 kcp 重发成功了,但是你再收到这个信令已经没有意义了。

from kcp.

firstimes avatar firstimes commented on June 8, 2024

再比如在线实时聊天,用户发一条消息给你,因为网络原因当时没有发送成功,APP 会告诉用户这条消息发送失败了,但是 kcp 却在努力重试,最后发送成功了。这就与 APP 的业务逻辑相违背了。既然已经告诉用户消息发送失败了,就不应该再发送成功。所以希望 kcp 能把这条消息丢弃掉,不要重发。

from kcp.

firstimes avatar firstimes commented on June 8, 2024

#336
我看其他的朋友也有这样的需求

from kcp.

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.