Comments (7)
"Beast 2" would be these:
https://github.com/cppalliance/buffers/
https://github.com/cppalliance/http_proto/
https://github.com/cppalliance/http_io/
from beast.
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.
Do you want to call
clear
onstring_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.
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.
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.
"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.
They are still in development though, and probably will be for at least 2 years
from beast.
Related Issues (20)
- Send data through a websocket connection from a separated thread HOT 4
- Using /O1 optimization in vs2017 will trigger a crash HOT 6
- [Help] Correctly handle message loop on idle websocket connection HOT 16
- Multiple web socket client issues HOT 18
- `zlib::deflate_stream::write` documentation wall of text HOT 1
- Discarding request body without needing a temporary buffer HOT 6
- Ergonomics of error list in `http::async_read` and `http::async_read_header` HOT 4
- ecorm's List of Pain Points HOT 14
- multiplexing HOT 6
- p0-.,\ HOT 1
- resolver.async_resolve hang issue HOT 2
- http::async_read hides client disconnection errors HOT 7
- http client tcp ssl stream async_shutdown blocks forever HOT 13
- Double definition of zlib DEF_MEM_LEVEL HOT 2
- Multiple unreachable code warnings if compiling with /W4 in VS2022 HOT 4
- Hi
- Hi,
- Facing error while running advanced_server.cpp file in centos 9. HOT 41
- http_client_sync example hangs on uploading ~2GB multipart data HOT 10
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from beast.