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

Uninitialized (SSL routines) in an adapted Boost Beast async-ssl websocket example

I'm trying to adapt boost beast's websocket/server/async-ssl/websocket_server_async_ssl.cpp to display dynamically refreshing html tables which are to be viewed by index.html. My code for the server main.cpp compiles and runs on 0.0.0.0:8080 but…
marital_weeping
  • 618
  • 5
  • 18
1
vote
1 answer

IO Context is not running in separate threads

I am trying to run a Kraken websocket client for two symbols, AUD/USD and AUD/JPY, in separate IOContexts in separate threads, using C++ and the Boost.Beast library. I have 6 cores available and want to run each symbol in a separate thread. However,…
1
vote
1 answer

Sending file to a server through HTTP with Boost Beast

I'm trying to send a file with POST request but every time I get an empty body and absolutely no information about the file on the server side. beast::http::request req; …
Latawiec
  • 341
  • 2
  • 10
1
vote
1 answer

How to detect ajax request using boost::beast

I need to detect if the request was sent through ajax or not using the boost beast http parser Some frameworks for http in other programming languages provide this capability. But how can this be done with boost::beast? I know that it depends on the…
1
vote
1 answer

boost::beast http chunked response buffer

I have response parser boost::beast::http::parser. As i understand, buffer_body means that the response body data should be stored in the user-provided buffer. But, when i set the chunk callback on the parser…
1
vote
1 answer

Boost Beast "bad version" while handshake and "Operation cancelled" in write

I've constructed a socket client and server and using it communicate locally Building is good, but when running in root privilege(bind() needs root), the socket got bad version while handshake. for simplicity, the error code came…
Chivas1000
  • 13
  • 3
1
vote
1 answer

How to send websocket message while waiting to receive?

My goal is to register to a websocket service to get real-time company quotations. So I based my code on the following example, by mostly calling (again) async_read, once we receive a quotation to accept futures…
1
vote
1 answer

Access boost tcp stream object from lldb

I'm trying to print the reference value of std::optional which is from the following type: boost::beast::ssl_stream I can print the…
Zohar81
  • 4,554
  • 5
  • 29
  • 82
1
vote
1 answer

Best way to parse cookies with Boost.Beast

What is the best way to parse/iterate cookies with Boost.Beast? The method by Vinnie Falco does not works: http::request req; ... // Print each cookie in the request for(auto param : http::param_list(req[field::cookie])) std::cout <<…
Raider
  • 197
  • 2
  • 10
1
vote
2 answers

Boost Beast, Handshake, Keep-Alive

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 AWS Instance to Bitmex with Boost Beast and Ubuntu…
Henry
  • 93
  • 1
  • 10
1
vote
1 answer

boost-beast specify source endpoint to bind to

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, template
Joris Peeters
  • 123
  • 1
  • 11
1
vote
1 answer

Beast SSL Stream Shutdown During Handshake

I am using beast for implementation of HTTPS Client. In order to make the handshake I call async_handshake. But if I try to shutdown the stream via async_shutdown, I receive the following assert:…
1
vote
1 answer

root_certificates.hpp in boost should be specific?

I'm new in SSL concept , Sorry I don't know my question is correct or not ... Recently I wanna know root_certificates.hpp should be specific for every clients? I mean that clients should create it by openssl?? or it's general and all clients can use…
H.M
  • 425
  • 2
  • 16
1
vote
0 answers

Boost Beast Websocket: Application Data After Close Notify

I am using boost::beast as well as boost::asio to implement a websocket client with SSL support. My WebsocketClient class has the following members: boost::asio::io_context& io_context; boost::asio::ssl::context& ssl_context; …
singular
  • 13
  • 3