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

io_context.run() for boost beast server

I have a RESTServer.hpp implemented using boost.beast as shown below. #pragma once #include #include #include #include #include…
liv2hak
  • 14,472
  • 53
  • 157
  • 270
0
votes
0 answers

C++ requires type specifier for all declerations

I have a http server as shown below. #pragma once #include #include #include #include #include #include…
liv2hak
  • 14,472
  • 53
  • 157
  • 270
0
votes
1 answer

Is boost::beast::static_string memcopyable/trivial type?

I am looking for a string implementation with fixed upper size that can be used in memcopy environment and that is trivially constructible and copyable. I found boost beast static_string, but IDK if my example works by accident or no? #include…
NoSenseEtAl
  • 28,205
  • 28
  • 128
  • 277
0
votes
1 answer

Passing an additional parameter to a function called using beast::bind_front_handler

I have a boost::beast REST client. the .hpp and .cxx are given below. #pragma once #include #include #include #include #include…
liv2hak
  • 14,472
  • 53
  • 157
  • 270
0
votes
1 answer

How do I convert a boost::beast's response to a response?

I need to convert boost::beast::http::response to boost::beast::http::response. What's an elegant and efficient way of doing so using beast's api? P.S. I think serializing and parsing…
david-hoze
  • 1,045
  • 15
  • 31
0
votes
1 answer

Boost websocket_server_async.cpp example

I was reading the boost websocket example here. In the listener class, it initializes the socket_ object. After listener accepted the connection, the socket_ is being std::move to the session object. I didn't see any logic to recreate the socket_…
user926958
  • 9,355
  • 7
  • 28
  • 33
0
votes
0 answers

Boost.best websocket ios.run() exits after sending a request and receiving one reply not receiving subsequent messages

I am using boost beast websocket to subscribe to messages by sending a subscription message and should get back subscription reply and then the subscribed messages. The subscription reply is received but then ioc.run() returns and not receiving the…
Peter Kohn
  • 51
  • 4
0
votes
0 answers

How do I include boost/beast/core.hpp in my bitbake recipe? I used DEPENDS = "boost" which works for many boost libraries, but not beast

I am working on a bitbake/yocto project that requires boost/beast/core.hpp. In my .bb recipe file, as the title mentions, I tried DEPENDS = "boost" which successfully adds one other boost library that I need (boost/algorithm/string.hpp), but it…
phasor555
  • 225
  • 4
  • 13
0
votes
0 answers

How to use boost websocket to implement sub-protocol

I want to implement a websocket sub-protocol. For example, I have a weboscket server as ws://localhost:1234, now I need one more sub-protocol as ws://localhost:1234/sub. I know lib-websockets provides this function, but I haven't found it in boost…
vainman
  • 377
  • 1
  • 5
  • 18
0
votes
1 answer

Client (javascript) unable to receive image or binary from server using boost beast and opencv

I used one of one of the example of boost::beast web server asynchronous to communicate with client javascript using websocket. I am attempting to do the simple receiving image and write it in server side. The result I receive in the server side is…
0
votes
1 answer

Boost Async Websocket Server Issue

I've wrote an async websocket thru boost.beast. But when I try to run it, I cannot connect it. The server code like below. When I try to connect my websocket server, my chrome shows status connecting. When I debug thru VS2017, it never run into the…
vainman
  • 377
  • 1
  • 5
  • 18
0
votes
0 answers

Errors while compiling openssl project example

I'm trying to build example advanced-flex from boost-beast git example. I installed both boost and openssl from sources, so post didn't help me. I've basic understanding of building projects, my attempt is (-I... to fix openssl fatal error:…
Oleg
  • 11
  • 3
0
votes
1 answer

Unable to find the reason for "Broken Pipe" error while sending continuous data chunks through Beast websocket

I am working on streaming audio recognition with IBM Watson speech to text web service API. I have created a web-socket with boost (beast 1.68.0) library in C++(std 11). I have successfully connected to the IBM server, and want to send a 231,296…
RC0993
  • 898
  • 1
  • 13
  • 44
0
votes
1 answer

how to avoid callback hell with boost::beast?

I'm working on an application in which I want to use boost::beast/asio. I need to receive data via a websocket connection and issue requests to a REST API at the same time. In the boost::beast websocket/HTTP async client examples it seems like the…
b20000
  • 995
  • 1
  • 12
  • 30
0
votes
2 answers

Sending binary data through beast web-socket (in C++)

I want to send binary audio data to IBM watson STT service trhough websocket connection. I have successfully made the connection and now trying to send the data in following format: { "action":"start", "content-type":…
user10710089
1 2 3
18
19