Boost C++ http post get services: How to make more than one run on same port?
So I am trying to create some service model for my app. I need it to be in C++, based on free libs like boost ffmpeg and so o开发者_如何学Gon. So I found boost services. I wonder will be capable of making 2 or more apps (each of my services is stand alone app/process) share same port and just have difrent url endings. Like http://adress:port/service1/a=2&b=3
, http://adress:port/service2/c=string
. It seemed to me that theoretically it can be accomplished by creating some process like gateway for reading all incoming traffic and calling from it my service methods. I wonder where to get such open source thing or anything that would solve my problem.
If I was you I'd be looking at boost::asio
(see the http server in the examples) or for something a bit higher level, the Pion framework (which uses asio) or maybe cpp-netlib. It should normally suffice to have a single server process providing mixed functionality on one port in response to parsed URLs.
精彩评论