Git Product home page Git Product logo

Comments (7)

vinniefalco avatar vinniefalco commented on May 22, 2024 1

"Beast 2" would be these:
https://github.com/cppalliance/buffers/
https://github.com/cppalliance/http_proto/
https://github.com/cppalliance/http_io/

from beast.

ashtum avatar ashtum commented on May 22, 2024

Could you please elaborate on how you can achieve the same functionality with the code in the last example? Do you want to call clear on string_body if you only need to consume and discard the body?

from beast.

ecorm avatar ecorm commented on May 22, 2024

Do you want to call clear on string_body if you only need to consume and discard the body?

That could work if one doesn't mind the temporary memory usage. Perhaps, in those instances where one wants to discard the body, there could be a modifier in the parser that sets it to "discard mode". Or perhaps some new flush_body and async_flush_body functions?

I should clarify that I'm not stuck and the approach provided in the incremental read example works for me. It's just that I noticed how much "cleaner" incremental writes are and wondered if the Beast API could be enhanced so that it's just as tidy for incremental reads.

As the issue title suggests, this is suggestion for improvement and not a bug. Do with it as you wish. I will not feel offended if you don't deem it worthy of implementation and close this issue.

from beast.

vinniefalco avatar vinniefalco commented on May 22, 2024

You are right that the interface for incremental reading is a bit obtuse in Beast. This is a consequence of some design choices that weren't great. But it was the best I could do at the time. Changing this would require quite a bit of rethinking about how Beast works and I'm not so sure I want to invest in that since Beast is effectively in maintenance mode.

from beast.

ecorm avatar ecorm commented on May 22, 2024

This is a consequence of some design choices that weren't great. But it was the best I could do at the time.

I completely understand, having been down that road myself. Despite its warts, this library is still 10x better then what I could have written myself and has saved me countless hours of reinventing the wheel. Kudos to you and the other maintainers!

since Beast is effectively in maintenance mode

I was not aware of that (or I forgot). Since the library is in maintenance mode, I will close this issue, and a record will be kept for posterity in case a new Beast 2 is developed, or someone else writes a new C++ library that uses this one for inspiration.

from beast.

ecorm avatar ecorm commented on May 22, 2024

"Beast 2" would be these:

I ought to check those out and provide feedback now, instead of complaining years after their release like I'm doing now for Beast. 😁

from beast.

vinniefalco avatar vinniefalco commented on May 22, 2024

They are still in development though, and probably will be for at least 2 years

from beast.

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.