Giter VIP home page Giter VIP logo

Comments (5)

yedf2 avatar yedf2 commented on May 22, 2024

一般情况下使用:
buf.append(data)

有时为了避免数据拷贝,会采用下面这种用法
char * p = buf.makeRoom(2048)
// copy n bytes data
buf.addSize(n)

只有在很关注性能时,才会使用addSize时,因此实现时,不应做过多的检查与操作,避免影响性能

from handy.

liaodong avatar liaodong commented on May 22, 2024

我在用httpserver,发现同一个TCP连接中,如果客户端发送多条数据,会造成 httpserver的buffer的越界。猜测可能是addSize造成的。void TcpConn::handleRead(const TcpConnPtr& con) 中的 addSize

from handy.

yedf2 avatar yedf2 commented on May 22, 2024

您好,目前这个httpserver只是具备的最简单的功能,对于您这边的发送多条数据这类高级一些的用法,我们还不支持

from handy.

jievince avatar jievince commented on May 22, 2024

@yedf2 你好, 请问基于handy库和RFC2616(http协议)实现一个完整的http服务器在技术上可行的吗?

from handy.

yedf2 avatar yedf2 commented on May 22, 2024

您好,现有的nginx能够满足绝大部分需求,因此我们没有打算基于handy再实现一个

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.