Giter VIP home page Giter VIP logo

Comments (8)

zieckey avatar zieckey commented on May 21, 2024 1

是长连接。但心跳包由上层应用来发,因为每种应用的tcp协议可能不一样。

from evpp.

wangxin5355 avatar wangxin5355 commented on May 21, 2024

再问个事情,发生消息和接收消息时,是否可以设置偏移字节

from evpp.

zieckey avatar zieckey commented on May 21, 2024

很抱歉,没明白。请给出具体的代码片段,和你希望的使用方式。

from evpp.

wangxin5355 avatar wangxin5355 commented on May 21, 2024

我就想问问在这个框架下如何处理粘包和拆包

from evpp.

zieckey avatar zieckey commented on May 21, 2024

必然框架自己处理好了啊。上层应用无需关心。

from evpp.

zieckey avatar zieckey commented on May 21, 2024

收包时,evpp会把数据包缓存到 TCPConn::input_buffer_ 中,发包时,如果数据没有完全发送完,会顺序缓存到 TCPConn::input_buffer_中,当下次可写事件到来时,优先发送之前缓存的数据。

from evpp.

wangxin5355 avatar wangxin5355 commented on May 21, 2024

包头是否有记录包的大小?

from evpp.

zieckey avatar zieckey commented on May 21, 2024

这是上层应用层的TCP协议的事情,不该evpp库负责。每种TCP协议都不一样。例如http1.x和http2的协议就不一样,其记录TCP包大小的方式就不一样。

from evpp.

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.