haleyao
V2EX  ›  问与答

不懂就问, protobuf 包不知道大小,那么如何解决多个包串葫芦的情况呢?

  •  
  •   haleyao · Jul 18, 2020 · 1677 views
    This topic created in 2160 days ago, the information mentioned may be changed or developed.
    mcfog
        1
    mcfog  
       Jul 18, 2020 via Android
    召唤粘包警察(手动滑稽
    SingeeKing
        2
    SingeeKing  
    PRO
       Jul 20, 2020
    利用 varint,encode 时先记录长度、decode 时先读长度
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   3955 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 30ms · UTC 05:20 · PVG 13:20 · LAX 22:20 · JFK 01:20
    ♥ Do have faith in what you're doing.