Skip to main content
Filter by
Sorted by
Tagged with
1 vote
1 answer
93 views

I want to set up a watchdog that checks whether the io_context workers can pick up tasks within a reasonable time and are not stuck running long or blocking operations. To achieve this, I've ...
Zohar81's user avatar
  • 5,214
2 votes
1 answer
74 views

I have a Websocket class that connects asynchronously using Boost.Asio and Boost.Beast. The following code was working fine with Boost 1.78, but after updating to the latest Boost version, I now get a ...
Rutvik Parekh's user avatar
2 votes
1 answer
169 views

I am reading a http::request<http::string_body> request from the network using boost::beast, which is of type multipart/form-data. The request contains files and strings. How can I get each part ...
Joe J's user avatar
  • 1,349
3 votes
1 answer
101 views

I create http::response<string_body> and call prepare_payload() after the response is built like this http::response<http::string_body> res; res.version(11); res.result(http::status::ok); ...
Joe J's user avatar
  • 1,349
3 votes
1 answer
99 views

I have a websocket server where I call websocket::stream::async_accept to perform a handshake with the client. I also set a decorator to modify the headers like this conn->get_websocket_stream()....
Joe J's user avatar
  • 1,349
4 votes
1 answer
64 views

I create http::response_parser<http::buffer_body> and set header_limit and body_limit like this auto parser = std::make_shared<http::response_parser<http::buffer_body>>(); parser->...
Joe J's user avatar
  • 1,349
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
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
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
0 votes
0 answers
77 views

The documentation for websocket::stream::async_close says: This function is used to asynchronously send a close frame, which begins the websocket closing handshake. The session ends when both ends of ...
Joe J's user avatar
  • 1,349
2 votes
1 answer
80 views

The boost documentation has me confused. The boost 1.68.0 documentation for websocket::stream::async_ping says: This operation is implemented in terms of one or more calls to the next layer's ...
Joe J's user avatar
  • 1,349
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
152 views

When we write data to plain socket or ssl::stream, it is recommended to use message queue to send data. In this case, I store messages in queue of type std::queue<std::string> and generally use ...
Joe J's user avatar
  • 1,349
2 votes
1 answer
78 views

I need to read data from boost::beast::flat_buffer into a std::string, then modify the string object and write the result back into boost::beast::flat_buffer. To convert boost::beast::flat_buffer into ...
Joe J's user avatar
  • 1,349
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
124 views

I am reading an HTTP request from the network that I want to use in a handshake with a remote websocket server. The websocket::stream::async_handshake API does not provide a way to specify the request ...
Joe J's user avatar
  • 1,349
4 votes
1 answer
86 views

As I understand it, in HTTP 1.1 in case the response comes in the form of Transfer-Encoding: chunked, the response may also contain trailers (additional headers) after the body. I have two questions ...
Joe J's user avatar
  • 1,349
4 votes
1 answer
111 views

I have a program through which the user can send http requests. As you know, not every HTTP request assumes a response body. Responses to some requests may contain only headers (for example, a ...
Joe J's user avatar
  • 1,349
2 votes
1 answer
104 views

Using Boost.Asio in C++23, how can I declare the below code's endpoints variable outside of the try-catch scope in which it is assigned a value? If it was declared inside the try, the assignment would ...
user2366975's user avatar
  • 4,824
1 vote
1 answer
147 views

I read http request using boost::beast like this: // ... auto buffer = std::make_shared<boost::beast::flat_buffer>(); auto request = std::make_shared<boost::beast::http::request<boost::...
Joe J's user avatar
  • 1,349
0 votes
0 answers
53 views

I have a secure websocket server written with Boost Beast using Boost-asio. A significant portion of the connection code is documented here. The server uses RSA keys for TLS encryption. I would like ...
Paul Grinberg's user avatar
2 votes
0 answers
55 views

I have a secure websocket server written with Boost Beast. A significant portion of the connection code is documented here. I need to extend the code to make a runtime decision on whether the incoming ...
Paul Grinberg's user avatar
1 vote
2 answers
90 views

Clang tells me there is no viable conversion from the return value of boost::beast::http::async_write with completion token boost::asio::as_tuple(boost::asio::deferred) to awaitable<tuple<boost::...
climb4's user avatar
  • 326
1 vote
0 answers
138 views

Segmentation Fault in Boost Asio Server on Linux during flat_buffer::prepare() call Problem Description: I have a C++20 server application using Boost.Asio 1.85 that works perfectly on Windows but ...
Zayne Bariz's user avatar
0 votes
0 answers
38 views

Trying to get updates from a telegram bot with a post request: POST https://api.telegram.org/bot<token>/getUpdates This works fine in Postman, I am getting the response from bot: { "ok&...
Pavel Sh's user avatar
1 vote
1 answer
261 views

I'm building a WebSocket server using Boost.Asio and Boost.Beast with SSL. The server accepts connections, but I'm encountering an issue where the client disconnects shortly after connecting. The ...
sleepyhead's user avatar
1 vote
1 answer
169 views

I'm trying to develop a quick HTTPS client using boost::beast (version 1.86) and stackless coroutines. I'm throwing up an HTTPS post to api.mailgun.net. Everything works EXCEPT RIGHT AFTER the ...
Mikey A. Leonetti's user avatar
-1 votes
1 answer
165 views

I'm developing a websocket clent listening for Binance market data stream to read a quotes. I'm using Boost::Beast websocket for this purpose. The connection uses SSL. My problem is that my client ...
Danil's user avatar
  • 119
2 votes
1 answer
63 views

AsyncReadStream& stream, DynamicBuffer& buffer, basic_parser< isRequest >& parser, ReadHandler&& handler = net::default_completion_token_t< executor_type< ...
aj_codes's user avatar
2 votes
1 answer
188 views

template<typename Derived> class Websocket: public std::enable_shared_from_this<Websocket<Derived>> { public: using InternalWSType = boost::beast::websocket::stream< ...
works's user avatar
  • 127
0 votes
0 answers
99 views

I have been working to understand a series of unexplained memory allocations that don’t make sense in the boost beast websocket framework. I have taken the example of the async server implementation ...
user3826668's user avatar
1 vote
1 answer
111 views

void connections::start_acceptor(){ auto socket=std::make_shared<boost::asio::ip::tcp::socket>(ioc); con_acceptor.async_accept(*socket,[this,socket](const boost::system::error_code ec){...
aj_codes's user avatar
2 votes
1 answer
641 views

I have written a script using Boost Asio and Boost Beast to enable WebSocket communication through a proxy server. I managed to develop a working prototype following How to connect with boost::asio ...
Arandott's user avatar
3 votes
1 answer
100 views

I am using a timer and an async_read, so whenever the timer runs out it cancels the async_read by doing ws_.next_layer().cancel() so that i can continue with my next operation. but when I catch the ...
Manish I's user avatar
0 votes
1 answer
178 views

I have a boost::beast HTTP server that streams data to a connected client. I'm happy to ignore anything they send to me, so I constantly call async_write without calling async_receive. But I think ...
Stewart's user avatar
  • 5,210
2 votes
1 answer
103 views

I'm pretty unfamiliar with modern C++, but I've been looking at the Boost.Beast sample files and trying to understand how they work. Specifically, I've been looking at this http server sample. Here's ...
Dankmeister's user avatar
1 vote
0 answers
95 views

Currently I'm using codes of this link text and in on_read I call a function which sends some string data multiple times in a loop, using ws_write(). The problem is that I can not read from the same ...
Rasoul.A's user avatar
1 vote
1 answer
1k views

Maybe somebody can provide simple example(or references) on how to setup client and server using websocket from boost/beast library? I need an example on how to handle input message on server and ...
Max's user avatar
  • 79
1 vote
1 answer
772 views

I'm working with the Boost Beast advanced server example (available at Boost.org) and am using it as a basis for my own server. My understanding is that in this example, both the session and the ...
SoulfreezerXP's user avatar
0 votes
1 answer
154 views

When I load the following original boost beast 1.84.0 server example into my IDE QT Creator 13.0 (C++20), I get the following warning with clang-tools 17.0.1. How can I fix/work around this and is ...
SoulfreezerXP's user avatar
0 votes
0 answers
79 views

I am trying to write a Server code(Sender) to send a .gz(GZIP) file as part of HTTP GET response. I need use C++ based solution for this. I am using below approach. constexpr std::size_t chunk_size = ...
Niranjan Upadhya's user avatar
0 votes
1 answer
109 views

I'm getting errors when trying to pass a function using deducing-this to std::bind. See the example below. #include <iostream> #include <functional> struct A { void foo_deducing_this(...
Keltek's user avatar
  • 660
1 vote
1 answer
228 views

I was wondering that if we run multiple calls of async_resolve than in practice the io_context doesn't run more than one request at the time due to a known limitation. Here's a sample example where I'...
Zohar81's user avatar
  • 5,214
1 vote
1 answer
99 views

this is what my fileCollector looks like, it just stores a "cache" of files (so that you don't read the file during each request) class FileCollector { public: FileCollector()...
Simple Boy's user avatar
2 votes
1 answer
1k views

I'm encountering an issue while trying to establish a WebSocket connection with SSL using Boost.Beast and Boost.Asio. The WebSocket connection seems to be working only when I call both async_handshake ...
SpeakX's user avatar
  • 427
2 votes
1 answer
464 views

I'm planning to have TCP to WebSocket tunnel. Multiple TCP connections to one WebSocket connection(I know this require multiplexing but one thing at a time). This means having a TCP socket listening ...
Jelal's user avatar
  • 395
0 votes
1 answer
50 views

Representative code that I try it for http::request is #include <boost/beast/http/message.hpp> namespace http = beast::http; using Request = http::request; but for the last line I obtain &...
Mihai8's user avatar
  • 3,147
5 votes
0 answers
2k views

I'm porting a python application over to C++. As I'm not incredibly familiar with C++ I was wondering if there are any benchmark test result out there for websocket latency between the two libraries ...
Zercon's user avatar
  • 155
-1 votes
1 answer
103 views

I am trying to make a REASON API server that will accept requests from another application, but the problem is that after the first connection to it, it shuts down with the error -1073741819. When I ...
zxctatar's user avatar
  • 133
2 votes
1 answer
579 views

I have this code from Boost Beast async chat server examples: void ChatServer::StartAccept() { acceptor.async_accept( boost::asio::make_strand(acceptor.get_executor()), [self = ...
exnine's user avatar
  • 23

1
2 3 4 5
7