Skip to main content
Filter by
Sorted by
Tagged with
-7 votes
1 answer
62 views

Cannot include Beast library in C++ [closed]

I want to use websockets in a c++ project. For this I am using boost library. I ma currently unable to import the library. I have added the path in environment variable if i try to run the code this ...
Reyan Ahtesham's user avatar
1 vote
0 answers
73 views

how to write and read at the same time in boost ssl web socket server?

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
0 votes
0 answers
543 views

Is it possible to connect a c++ boost beast/asio websocket to a socket.io server in nodejs?

I've been struggling to get a basic application going where I use boost to attempt to connect to a local webserver hosted on nodejs using express and socket.io. the idea is to host a socket server and ...
Captain Dando's user avatar
0 votes
0 answers
300 views

C++ boost beast websocket crash after running a while

I am using boost beast to connect to a server's websocket. I only rewrite the on_read function in order to make the websocket never disconnect, the other parts are just copied from beast example code. ...
Kevin Yin's user avatar
0 votes
1 answer
1k views

How to handle ping request on client (boost::beast::websocket)

Imagine that you have some websocket client, that downloading some data in loop like this: #include <boost/asio.hpp> #include <boost/beast.hpp> #include "nlohmann/json.hpp" ...
Shamil Mukhetdinov's user avatar
1 vote
1 answer
163 views

Parsing json inside lambda function passed as handler function in async_read is causing json parsing error

#define BINANCE_HANDLER(f) beast::bind_front_handler(&binanceWS<A>::f, this->shared_from_this()) template <typename A> class binanceWS : public std::enable_shared_from_this<...
noobie's user avatar
  • 25
2 votes
1 answer
538 views

Should I clean up beast::flat_buffer when I see errors on on_read?

http_client_async_ssl class session : public std::enable_shared_from_this<session> { ... beast::flat_buffer buffer_; // (Must persist between reads) http::response<http::...
q0987's user avatar
  • 36.1k
0 votes
1 answer
234 views

Reacting to each tick events from the websocket

I would like to design my trading system reacting to each tick events from the websocket stream i subscribed to. So basically i have two options : void WebsocketClient::on_write(beast::error_code ec, ...
dopller's user avatar
  • 361
2 votes
1 answer
218 views

How to get request path in beast::websocket

I have the following beast::websocket example working: https://www.boost.org/doc/libs/1_76_0/libs/beast/example/websocket/server/async/ Starting from that code, and assuming that I want to distinguish ...
Carlos Lobo's user avatar
1 vote
1 answer
318 views

reduce response time while using async cpp boost socket

i've created an async beast server that gets a request from a browser, opens a second socket , writes the request , gets the response and sends it back to the browser. all async . as the "send ...
redemption's user avatar
1 vote
1 answer
501 views

How to find if the 'target' for websocket::stream::async_handshake() is not found?

For HTTP calls, you can do: http::async_read(m_stream, m_buffer, m_res, beast::bind_front_handler(&RestSession::on_read, shared_from_this())); // ... then void on_read(beast::error_code ec, std::...
subatomicdev's user avatar
2 votes
0 answers
481 views

Using boost::beast::websocket to send http post request

I've got the following class member boost::beast::websocket::stream<boost::beast::tcp_stream> ws_; which gets instantiated on class c'tor using boost::asio::io_service as parameter. I assume ...
Zohar81's user avatar
  • 5,152
2 votes
1 answer
541 views

Is there any way to subscribe and to listen feed in boost beast websocket?

I am using an example from boost beast documentation for async websocket client. The to send some command to subscribe and then to listen feed until it is terminated manually (preferably with other ...
user2426998's user avatar
0 votes
1 answer
713 views

How to use boost::beast to connect to Coinbase's websocket API

I'm a bit new to websocket programming. I've been trying to use this example :- https://www.boost.org/doc/libs/develop/libs/beast/example/websocket/client/async-ssl/websocket_client_async_ssl.cpp to ...
owagh's user avatar
  • 3,528
0 votes
1 answer
357 views

Measuring client back-up when using Boost.Beast WebSocket

I am reading from a Boost.Beast WebSocket. When my application gets backed up, the websocket sender appears happy to delay/buffer the data on their end (presumably at the application level, as they ...
jhourback's user avatar
  • 4,591

15 30 50 per page