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.
Questions tagged [boost-beast]
275 questions
2
votes
2 answers
Boost Asio and Beast mulitpart/form-data save binary from streambuf
My results look like...
POST /post HTTP/1.1
Host: localhost:3003
User-Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:62.0)
Gecko/20100101 Firefox/62.0
Accept: */*
Accept-Language: en-US,en;q=0.5
Accept-Encoding: gzip, deflate
Referer:…

forresttales
- 51
- 1
- 7
2
votes
1 answer
Boost beast integration issues in UE4 plugin?
I am trying to create a UE4 plugin then I can simply create a blueprint function like so using Boost Beast client example :
void UBoostBPFunctionLibrary::ConnectWebsocket(FString inMessage, FString& outResStr)
{
//using tcp =…

Syed Alam Abbas
- 521
- 6
- 21
2
votes
0 answers
boost::beast websocket asynchronous reading and writing connection lost
I am trying to read the RocketChat websocket API using boost::beast. It works when I read it using the synchronous examples, but when using the async_* functions somehow it appears the connection is closed.
The offending code in question:
#include…

Martijn Otto
- 878
- 4
- 21
2
votes
1 answer
Error reconnecting boost beast (asio) websocket and http connection after disconnect
I am creating a client application that connects to a server using a an ssl Websocket connection and an ssl Http (Keep-Alive) connection and I am using boost::beast package to do the same. So as to detect a dead connection i have implemented a…

john_zac
- 1,241
- 2
- 11
- 16
2
votes
0 answers
boost::beast ws_.async_handshake breaks when synchorneous function works
I've built an app that connects to bitmex through boost::beast.
The synchronous call works fine using the code provided at:
https://www.boost.org/doc/libs/develop/libs/beast/example/websocket/client/sync-ssl/websocket_client_sync_ssl.cpp
however…

user10055921
- 21
- 1
2
votes
1 answer
How to use boost::http::response_parser for parsing string?
I wanted to parse my own data using response_parser of boost::http. All the documentation I found is linked with http::request of boost. I have written my own SSLLink to get data. I want to feed the data incrementally to response_parser and check if…

bonacci
- 121
- 4
2
votes
1 answer
boost beast memory usage for bulk requests
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 http), and there wasn't grows up memory.
Q: What's…

Khurshid Normuradov
- 866
- 8
- 15
2
votes
1 answer
Trying to replace my libwebsocket code with Boost::Beast
I am using libwebsockets to connect to webserver using C++ program. I am able to connect. But how do I do this in Boost::Beast
// Setup our lws connection info
struct lws_client_connect_info ConnectInfo;
memset(&ConnectInfo, 0,…

Syed Alam Abbas
- 521
- 6
- 21
1
vote
1 answer
How to move a Boost.Beast parser object?
I am building a library on top of Boost.Beast and I am facing an issue. I do not understand why boost::beast::http::parser is not movable. The only way to move it, is to use the constructor designed for changing the body type, but this is defined…

Mauro
- 90
- 9
1
vote
1 answer
error: no matching function for call to set(boost::beast::http::field, std::string_view&)’
boost_1_82_0/boost/beast/core/string_type.hpp:18:1: note: ‘#pragma message: BOOST_BEAST_USE_STD_STRING_VIEW is deprecated, use BOOST_NO_CXX17_HDR_STRING_VIEW instead’
18 | BOOST_PRAGMA_MESSAGE("BOOST_BEAST_USE_STD_STRING_VIEW is deprecated, use…

q0987
- 34,938
- 69
- 242
- 387
1
vote
1 answer
Does a coroutine call boost::asio::write block the current thread?
When the coroutine calls boost::asio::write, the coroutine will block waiting for the buffer to become writable or the coroutine will be scheduled out because the tcp buffer is full?

qing zhao
- 23
- 2
1
vote
0 answers
c++ gemini websocket connection. error uninitialized
I am trying to create a basic vanilla websocket client using c++ and the boost/beast library. Following the examples, I can create an unsecured ws connection. But when I try to incorporate ssl into the mix, everything falls apart. It fails during…

M Ivan
- 11
- 2
1
vote
1 answer
Boost::Asio async client - how to know the other side did TCP FIN?
I am using a boost::beast::tcp_stream which wraps around a boost::asio::basic_stream_socket for an asynchronous client.
No. Time Source Destination Protocol Length Info
...
117 0.261388597 127.0.0.1 …

Jetski S-type
- 1,138
- 2
- 16
- 32
1
vote
1 answer
Convert boost::beast::multibuffer to std::istream
I am getting boost::beast::multibuffer object from http::response::body() method. Then, I want to parse json content from it like this:
boost::property_tree::read_json(requestBodyStream, propertyTree);
Should I use…

Стас
- 129
- 1
- 4
1
vote
1 answer
How to convert a Boost.Beast request to a request?
I'm writing a boost::beast server, and I'm having trouble figuring out how to use the different request flavours.
When a connection is accepted, I do this to read the request:
I call async_read(), which populates my request
I look at…

Stewart
- 4,356
- 2
- 27
- 59