Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to create simple http server with boost capable of receiving data editing it and sharing?

So using any free opensource cross platform library like boost how to create a web service capable of reciving a data stream (for example stream of mp3 frames) on one URL like http://adress:port/service1/write/ and capable of sharing latest recived data to all consumers on http://adress:port/service1/read/ so of course mp3 is just an example of packed stream-able data - generally it can be anything packed. How to create such thing?

Generaly I am honesly triing to understend how to do such thing with C++ Network Library but it is just quite unclear to me.

like image 965
Rella Avatar asked Nov 13 '10 15:11

Rella


People also ask

What is ASIO boost?

Boost. Asio is a cross-platform C++ library for network and low-level I/O programming that provides developers with a consistent asynchronous model using a modern C++ approach. Overview.

What is 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.


1 Answers

The boost::asio documentation has four examples of complete HTTP server implementations, each with a slightly different threading architecture.

http://www.boost.org/doc/libs/1_43_0/doc/html/boost_asio/examples.html

like image 55
James Brock Avatar answered Oct 07 '22 17:10

James Brock