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
4
votes
1 answer

Why does this boost::beast code hang inside a container but not outside of it in boost 1.75.0 but not boost 1.67.0?

After upgrading from boost 1.67.0 to boost 1.75.0, we're having problems with boost beast's HTTP request library. I have the following code which communicates with the Kubernetes API server to store a custom resource via the REST interface using…
stix
  • 1,140
  • 13
  • 36
4
votes
1 answer

Why does Boost-Beast give me a partial message exception

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::http::read throws an exception saying "partial…
abcd
  • 51
  • 1
  • 2
4
votes
1 answer

Device or resource busy in container from scratch and alpine, but not on ubuntu

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 the title describes, I have a working executable…
Guillaume Racicot
  • 39,621
  • 9
  • 77
  • 141
4
votes
2 answers

HTTP Delay from AWS Instance to Bitmex with Boost Beast and Ubuntu 18

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 milliseconds. The same is true for $ping bitmex.com/api/v1…
jp94
  • 315
  • 4
  • 15
4
votes
1 answer

How to set up http header in boost-beast http request?

I am trying to send message with a header using boost http library. I searched for a way to send message with a header but I could not find. what I want to do is following auto const results = resolver.resolve(host,…
wwwwe
  • 127
  • 1
  • 7
4
votes
1 answer

Boost Asio SSL through proxy, "handshake: wrong version number"

I'm trying to establish a TLS connection through my proxy server using Boost.Asio (and Boost.Beast). Setting up the tunnel using HTTP CONNECT works as expected. The code I use as a demo is: net::io_context ioc{}; std::thread([&] { ioc.run(); …
Lexusminds
  • 335
  • 2
  • 14
4
votes
1 answer

boost asio tcp socket 1.70 not backward compatible

I am using boost-beast for my http server. I started writing the server based on the example provided on boost beast documentation (probably version 1.66). Now after boost 1.70 I got compilation issues. Everything was working perfectly even with…
Neel Basu
  • 12,638
  • 12
  • 82
  • 146
4
votes
2 answers

Timeout for boost::beast sync http client

I am adapting the synchronous HTTP client from the Boost Beast examples. Unfortunately the example client does not include timeout options and sometimes gets stuck in my workloads. I tried adding timeouts…
Haatschii
  • 9,021
  • 10
  • 58
  • 95
4
votes
1 answer

Boost-beast websocket handshake problems

I am attempting to set up a websocket connection with a remote server and get the following error: The WebSocket handshake was declined by the remote peer I am following this example:…
Abhinav Boyed
  • 43
  • 1
  • 4
4
votes
0 answers

Boost Beast reconnect websocket connection after close

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 have a…
john_zac
  • 1,241
  • 2
  • 11
  • 16
4
votes
3 answers

how to use boost::asio::defer() in composing function?

On Boost 1.66, Asio have deprecated the asio_handler_is_continuation hook function, promoting usage of defer function. It seems that defer function is behaving exactly the same as post when asio_handler_is_continuation==true. However, the way of…
he rambled
  • 154
  • 2
  • 8
4
votes
1 answer

C++ Boost 1.66 using Beast http request Parser for parsing an string

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 this case and if so it would be Great if you give an…
Amir Rasti
  • 706
  • 7
  • 19
4
votes
1 answer

Boost Beast: how to produce non-chunked response with a custom body when a content length is not readily available?

I am trying to implement a custom body type that would hold a parsed JSON tree object. The task seems pretty natural, but I can't find a way to generate non-chunked HTTP messages carrying JSON using Beast. I have a REST client/server implemented by…
Vlad.Z
  • 160
  • 10
4
votes
1 answer

SSL tunnel with Boost::Beast

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 HTTP Connect verb (they are planning to add direct…
ABu
  • 10,423
  • 6
  • 52
  • 103
3
votes
1 answer

reading and processing packets in parallel using boost asio

I've got a thread that listen to socket, read incoming packets, process them and send them to another socket. I'd like to accelerate this flow, by adding dedicated thread for packet processing without changing the ordering of the packets. I've…
Zohar81
  • 4,554
  • 5
  • 29
  • 82
1
2
3
18 19