How to create simple http server with boost capable of receiving data editing it and sharing?
Solution 1
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
Solution 2
You do not say what platform to use, but if Windows is an alternative, the Windows HTTP API easy to use and a great performer.
http://msdn.microsoft.com/en-us/library/aa364510(VS.85).aspx
Comments
-
Rella almost 2 years
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 onhttp://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.
-
Daniel Lidström over 13 yearsThis might be the easiest option: the QHttp class: doc.trolltech.com/4.7/qhttp.html.
-
eonil about 11 yearsPoco (pocoproject.org) can be an alternative. It has ready-made HTTP server.
-
-
Rella over 13 yearsYou got me - I use windows=) So this one non cross-platform library would generally work for me. but I need an example described above)
-
Jeroen almost 11 yearsWindows as a host for server software? :o