Git Product home page Git Product logo

Comments (1)

skywind3000 avatar skywind3000 commented on May 18, 2024 4

tcp的冗余校验只是个CRC而已,判断是否合法,不合法就直接当丢包处理,并不能减少重传,这部分实现一般会紧贴传输层来实现,比如KCP要使用起来你本身就需要写一个udp的传输会话管理模块,而UDP本身就已经带了CRC校验了,所以没必要做到KCP中,很多人也会选择自己再做一层CRC,但是一般也是做到UDP传输管理模块中。

你想说的是冗余编码吧和前向纠错吧,https://github.com/skywind3000/kcp/wiki/KCP-Best-Practice 我这里讨论过。

要做冗余编码或者前向纠错的话,一般会设计另外一层协议来实现,即把kcp的输出接到那层协议的输入,协议栈嘛,协议设计最好的模型是分层,自由灵活组合,没必要所有东西搅在一起,比如我自己用的都是三层协议:

会话管理层:面向用户
KCP层:为会话管理层提供I/O接口
传输层:前向纠错
UDP层:CRC校验,加密收发等。

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.