Questions tagged [boost-beast]

Beast is a C++ header-only library serving as a foundation for writing interoperable networking libraries by providing low-level HTTP/1, WebSocket, and networking protocol vocabulary types and algorithms using the consistent asynchronous model of Boost.Asio.

275 questions
1
vote
1 answer

Angular5 + SocketIO to Boost::Beast

So i am using the tutorial here to setup my socket.io connection using Angular 5.x https://blog.codewithdan.com/2017/11/07/pushing-real-time-data-to-an-angular-service-using-web-sockets/ There are two scenarios happening and im not sure why one is…
user1024792
  • 553
  • 1
  • 10
  • 23
1
vote
0 answers

Boost.Beast C4702 "unreachable" compiler warning on MSVC++ build

Building with Boost-1.67.0 and VS on Windows, I get a C4702 "unreachable" warning for boost::beast::http::detail::verb_to_string(verb v), in boost/beast/http/impl/verb.ipp: template inline string_view verb_to_string(verb v) { …
badfd
  • 63
  • 7
1
vote
1 answer

Multiple subscriptions with different subscription rate design through boost::beast

I am trying to design a system where I am creating a tree like structure and users can subscribe to any branch of the tree. Ex: If a tree looks like A--B--C | D Here A is the parent of B and B is the parent of C and D Now, a user…
1
vote
1 answer

How to read only body from response

The examples of reading the response that I've seen look something like the following. But this prints out the response header as well as the response body. Does Beast expose a way to get just the body as a string? I t looks like it is possible to…
user782220
  • 10,677
  • 21
  • 72
  • 135
0
votes
0 answers

Curious case of missing responses for specific HTTP requests when there's network load

We are working on developing a low latency high throughput client which connects to different exchanges. The main piece of code that actually sends HTTP requests through is this below void send_request(http_client::request_parameters request_params,…
Rohith Uppala
  • 167
  • 1
  • 2
  • 7
0
votes
0 answers

How to parse http response to boost beast

I want to parse a response with boost beast. In my program I receive the response with cpp-httplib and then I try to parse it with boost beast for the further processing. However, I am not quite sure how to parse the response correctly. Even after…
haapoo
  • 109
  • 2
  • 9
0
votes
0 answers

How to create a HTTPS server using Boost.Beast in C++ and how to use & set up certificates

I am working on a project that needs a C++ HTTPS server to run in a separate thread from a MQTT & later on, another HTTPS server, and, out of all libraries, Boost comes with some examples, including HTTPS so this make me choose it in the first…
0
votes
0 answers

Boost::asio WebSocket (tcp::no_delay not working) :- 2 messages concatenate at client

I am new to boost library. I am writing a WebSocket server. But facing a problem that when I send a message to a client 2 messages concatenate like first I send "Hello" and then "World". but the client received "HelloWorld". I am attaching my code…
0
votes
0 answers

boost::beast "stream truncated" error when parsing http stream chunks

I use boost::beast to get data over HTTPS stream. (in particular from EXANTE API ). My code is almost identical to the example from the official documentation of the Beast library: Chunked encoding. Everything works correctly, but periodically…
0
votes
0 answers

Using boost-beast to download a file give poor performance due to short sliding window

I'm using boost-beast connection on macOS application to download a file.. in some rare cases I see bad TCP performance. Packet trace investigation revealed that the TCP sliding window is very small (2688 bytes), about 2 packets, and I believe this…
Zohar81
  • 4,554
  • 5
  • 29
  • 82
0
votes
0 answers

Two queries received in boost beast when calling it from Postman

I am running the (very basic) following program in a Linux docker container and I am testing it by calling it from Postman with a POST event or from an HTML page. When I test this, I get two events where acceptor.accept(*socket) is called. One where…
BadJerry
  • 154
  • 1
  • 12
0
votes
0 answers

Boost::beast async websocket doing read and write operations

I want a WebSocket client that's capable of reading and writing asynchronosuly. Reading is working A-OK thanks to other StackOverflow user. The idea behind reading is there's a thread that's always reading, permamently blocked. My writing-part idea…
Latawiec
  • 341
  • 2
  • 10
0
votes
0 answers

How do I set the Ping PayLoad in Beast websocket::stream when automatic Ping Pong is Set to True?

I am currently trying to implement an async Websocket Client. My timeout options are set in the following way to enable automatic ping pong. However I struggle to find a way to define the ping payload message. Are there any ways to achieve that?…
0
votes
0 answers

C++ boost beast websocket crash after running a while

I am using boost beast to connect to a server's websocket. I only rewrite the on_read function in order to make the websocket never disconnect, the other parts are just copied from beast example code. Here is my…
Kevin Yin
  • 21
  • 1
  • 5
0
votes
1 answer

Can you unblock boost::asio::io_context while waiting for async_read?

im trying to connect to a server via boost asio and beast. I need to send heartbeats to the server every 40 seconds, but when I try to, my write requests get stuck in a queue and never get executed, unless the server sends something first. I have…
soey_sause
  • 23
  • 5