Skip to main content
Filter by
Sorted by
Tagged with
3 votes
1 answer
2k views

I'm making about 30,000 queries to a GraphQL server; because I have a high-latency connection, I'm doing many queries in parallel, using threads. Currently each query makes a new connection; I'd like ...
Pierre Abbat's user avatar
2 votes
1 answer
2k views

I have response parser boost::beast::http::parser<false, boost::beast::http::buffer_body>. As i understand, buffer_body means that the response body data should be stored in the user-provided ...
Samuel Smith's user avatar
1 vote
1 answer
1k views

I`m trying to use a web socket client that connects to a server using Boost library. The situation is that the server sometimes sends pre-determined amounts of JSON messages, but sometimes more. From ...
Mecanik's user avatar
  • 1,074
10 votes
2 answers
12k views

I've to use a C++ library for sending data to a REST-Webservice of our company. I start with Boost and Beast and with the example given here under Code::Blocks in a Ubuntu 16.04 enviroment. The ...
Banzai's user avatar
  • 189
5 votes
1 answer
5k views

So I don't know why but I can't wrap my head around the boost Beast websocket server and how you can (or should) interact with it. The basic program I made looks like this, across 2 classes (...
user1024792's user avatar
4 votes
1 answer
5k views

I'm not using beast http server in my project but I was searching for a solution to parse an http request in form of std::string in my program ,is it possible to use boost/beast/http/parser.hpp in ...
Amir Rasti's user avatar
3 votes
1 answer
6k views

I have a RESTServer.hpp implemented using boost.beast as shown below. #pragma once #include <boost/property_tree/json_parser.hpp> #include <boost/beast/core.hpp> #include <boost/beast/...
liv2hak's user avatar
  • 15k
3 votes
1 answer
2k views

Context I build a webserver using boost coroutine ts, boost asio and boost beast. There is a coroutine for reading and one for writing. There is a message_to_send queue where messages get pushed to ...
Koronis Neilos's user avatar
2 votes
1 answer
109 views

I have one active async operation, it is http::async_read. At the moment when I want to close the ssl connection, I cancel this async operation on the socket by calling ip::tcp::socket::cancel. Then I ...
Joe J's user avatar
  • 1,349
2 votes
1 answer
843 views

I'm learning Boost.Beast & Boost.Asio from this example libs/beast/example/http/server/async-ssl/http_server_async_ssl.cpp - 1.77.0. As far as I know, all I/O operations that happen on a I/O ...
Cody's user avatar
  • 649
1 vote
1 answer
2k views

I'm using boost::beast for TCP connections, with an async flow. I'm wondering what the most appropriate way is to specify the source IP/port to bind to. I illustrate one attempt below, ...
Joris Peeters's user avatar
1 vote
2 answers
2k views

I am trying to setup a service for interrogating a distant database based on Boost Beast. Even if the context and the issues are totally different, I have found this question on SO: HTTP Delay from ...
Henry's user avatar
  • 123
1 vote
2 answers
1k views

I need to expose an async REST api for c++ clients, that internally uses boost::beast for sending REST requests / receiving responses. The starting point is http_client_async.cpp example. Now the ...
ashishsony's user avatar
  • 2,607
6 votes
1 answer
3k views

I'm writing tests for my full-duplex server, and when I do multiple (sequential) async_write calls (although covered with a strand), I get the following assertion error from boost::beast in the file ...
The Quantum Physicist's user avatar
6 votes
1 answer
3k views

I've modified the http_sync example to connect through a proxy, I've tested with wireshark and the problem is that after I send the http connect request, the proxy returns with the code 200 OK, and my ...
Petar Stankovic's user avatar
5 votes
0 answers
2k views

I am using boost::beast to create a websocket connection and so far it seems to work fine. But I am unable to figure out if i should replace the websocket::stream variable after disconnect. i.e. I ...
john_zac's user avatar
  • 1,291
4 votes
2 answers
767 views

I have an AWS ec2 instance in eu-west-1c which is the same data centre as the target server - www.bitmex.com. If I run $ping bitmex.com from the instance the average round trip time is ~0.4 ...
jp94's user avatar
  • 325
4 votes
1 answer
3k views

I edited the question, but my problem was manifesting itself in an alpine container. I now get the same problem in a container from scratch. This is the same question but a bit more narrowed down. As ...
Guillaume Racicot's user avatar
4 votes
1 answer
2k views

I´m trying to use the boost beast http library for an HTTP Client. It´s working without any issues when I´m using a simulated server, however when I try connecting to the real server, boost::beast::...
abcd's user avatar
  • 51
4 votes
1 answer
2k views

I want to connect to a proxy server that only allows HTTP connections, to speak with the target server by HTTPS. The proxy server documentation states that the only way to do that is by means of the ...
ABu's user avatar
  • 12.5k
3 votes
1 answer
2k views

I'm using gmock and have mocked a function that takes boost::beast::http::response_parser as an out parameter. Function signature looks something like: error_code readFromSocket(boost::beast::http::...
Abhishek Arya's user avatar
3 votes
1 answer
598 views

How do i check client information as user-agent from boost async web socket server ? I have checked: https://www.boost.org/doc/libs/develop/libs/beast/example/websocket/server/async/...
SASA's user avatar
  • 41
3 votes
1 answer
160 views

Let's say we have a websocket client based on boost::beast. At some point we want to send a ping frame to the server. To do this, boost::beast::websocket::stream offers two options: Use the ping ...
Joe J's user avatar
  • 1,349
3 votes
1 answer
59 views

I have a response parser of type http::response_parser<http::buffer_body>, which I need to convert to a parser of type http::response_parser<http::string_body>. I do the conversion after ...
Joe J's user avatar
  • 1,349
2 votes
1 answer
1k views

I run this boost-beast-client-async-ssl example and it's OK. But, if I create 10000 sessions at same time, my program memory usage grows up to 400 MB and never down. I'd test without ssl (simple ...
Khurshid Normuradov's user avatar
2 votes
1 answer
598 views

In the boost asio documentation for strands it says: Strands may be either implicit or explicit, as illustrated by the following alternative approaches: ... Where there is a single chain of ...
Reizo's user avatar
  • 1,467
2 votes
2 answers
2k views

I have the following code: std::queue< nlohmann::json > outgoingMessages; void session::do_write( void ) { if ( outgoingMessages.size() > 0 ) { auto message = outgoingMessages....
Nicholas J Ingrassellino's user avatar
2 votes
1 answer
119 views

I need to read the response from an HTTP server like this: first call boost::beast::http::async_read_header to get headers, then read the response body (if any). To read the body I use boost::beast::...
Joe J's user avatar
  • 1,349
2 votes
2 answers
2k views

I have cases when there is a chunked response which is too big for beast, and I want to stop before I get to beast's body_limit, and continue handling the message from that point using plain boost::...
david-hoze's user avatar
  • 1,085
2 votes
2 answers
999 views

I have just now updated the boost library from 1.68.0 to 1.70.0 to get the timeouts operations in (beast) websocket ssl client async example. In the above link you will see: void on_resolve( ...
RC0993's user avatar
  • 978
1 vote
1 answer
106 views

That's how documentation describes boost::beast::websocket::stream::set_option: Set the permessage-deflate extension options. https://live.boost.org/doc/libs/1_68_0/libs/beast/doc/html/beast/ref/...
Joe J's user avatar
  • 1,349
1 vote
1 answer
2k views

I'm trying to implement an app with access to google drive in beast boost C++ usingoauth2 authentication. https://developers.google.com/identity/protocols/OAuth2ForDevices I try to get the user code ...
user2828781's user avatar
1 vote
1 answer
2k views

I have an application of a client where I need to receive http "long running requests" from a server. I send a command, and after getting the header of the response, I have to just receive json data ...
The Quantum Physicist's user avatar
1 vote
1 answer
1k views

I am having issues compiling asio code through visual studio linux project. I keep getting the following linking error : Linking objects 1>D:\C++\test_beastboost\test_beastboost\obj\x64\Debug\main....
kubuni's user avatar
  • 107
1 vote
1 answer
2k views

I am not very familiar with the boost::asio fundamentals. I am working on a task where I have connected to a web server and reading the response. The response is thrown at a random period, i.e. as and ...
RC0993's user avatar
  • 978
1 vote
0 answers
615 views

I'm trying to display an image file in the browser through a boost beast http server. Using the example from here I wrote the following: #include <iostream> #include <string> #include <...
Kanishka Rakhecha's user avatar
1 vote
1 answer
2k views

code : https://gist.github.com/Naseefabu/173c928603e564879683ccdf10d9d0f8 When i run this and print the response to the console: Sending GET /api/v3/time HTTP/1.1 Host: api.binance.com content-type: ...
dopller's user avatar
  • 361
1 vote
1 answer
2k views

#include <boost/beast/http.hpp> #include <boost/beast/ssl.hpp> #include <boost/beast/version.hpp> #include <boost/asio/executor.hpp> #include <boost/asio/strand.hpp> #...
dopller's user avatar
  • 361
1 vote
1 answer
1k views

Based on websocket_client_async_ssl.cpp, I modify the function of on_read so that I can save the content into a local file. class session : public std::enable_shared_from_this<session> { std:...
q0987's user avatar
  • 36.2k
1 vote
2 answers
771 views

Problem Statement I'm trying to build a websocket connection to the OKEX exchange using their websocket API. I am using Boost::Beast websockets. The problem is that OKEX's servers don't follow the ...
Joe's user avatar
  • 1,988
1 vote
0 answers
473 views

I'm attempting to solve a memory leak in my application that appears to only occur when I close the application. I've installed Deleaker, and it's pointed me to a function I adapted from a Boost/Beast ...
Skewjo's user avatar
  • 429
0 votes
1 answer
846 views

I am looking for a string implementation with fixed upper size that can be used in memcopy environment and that is trivially constructible and copyable. I found boost beast static_string, but IDK if ...
NoSenseEtAl's user avatar
  • 30.9k
0 votes
0 answers
221 views

I am using boost beast websocket to subscribe to messages by sending a subscription message and should get back subscription reply and then the subscribed messages. The subscription reply is received ...
Peter Kohn's user avatar