From: Rodrigo M. <rod...@gm...> - 2008-11-01 22:06:31
|
Thanks again. However the current architecture is not generic enough. It feels like HTTP was the only protocol thought about during it's design. I'll post my progress here. Rodrigo On Fri, Oct 31, 2008 at 4:50 PM, Divye Kapoor <div...@gm...> wrote: > Hello Rodrigo, > > On Fri, Oct 31, 2008 at 5:01 PM, Rodrigo Madera <rod...@gm...>wrote: > >> Thank you for your reply. >> > > No need for thanks. Glad to help. :-) > > >> >> However, I don't need a whole set of libraries. I already have Boost's >> ASIO. >> > > Just like the STL is good to have along with vanilla C++, cpp-netlib is > good to have along with Boost ASIO, in fact, we build on Boost ASIO to > provide a higher level of functionality. > > >> >> I'll do the code using what you proposed and we can go from there. There >> will be no other way, unfortunately. >> >> Here is the link you asked for: >> http://article.gmane.org/gmane.comp.lib.boost.user/41209 >> > > Although I haven't used Apache MINA, from what I could gather from your > post, I would say that you are looking for a generic way to handle protocols > by simply plugging in protocol message handlers. Am I correct? > > Given that we are looking to support a wide variety of protocols (which > might be stateful/stateless or have other interdependencies) such a > structure has not been used for the design as it might prove to be too > brittle for extension. However, our current design (explained at > http://cpp-netlib.wiki.sourceforge.net/ ) does a neat job of giving you > maximum flexibility in the implementation of a protocol. The syntax you > indicated can be easily implemented in a specialized client class. If you > look at how http::client is implemented > (boost/network/protocol/http/client.hpp) you will see how a basic_message is > interpreted according to the specifications of the http protocol and the > response is converted into another basic_message. > > In your scenario, you could defer the parsing of the protocol "headers" to > function objects or the like. > > > >> Also, please note that if you ever needed to deal with a binary protocol >> using ASIO, you should have needed this kind of implementation code. >> > > Currently, we support binary file transfer over HTTP. Given that we don't > touch the payload of the message, we have not come across any issues in the > implementation of binary transfer. However, if you are interested, please > browse the code and see if you can help us improve; we'll be glad of your > help. > > >> >> Regards, >> Rodrigo >> >> >> > Hope that helped, > Divye > > > > -- > An idealist is one who, on noticing that a rose smells better than a > cabbage, concludes that it will also make better soup. > H. L. Mencken (1880 - 1956) > My official web site: http://people.iitr.ernet.in/shp/061305/ > Webmaster: http://www.drkapoorsclinic.com > Blog: http://divyekapoor.blogspot.com > > ------------------------------------------------------------------------- > This SF.Net email is sponsored by the Moblin Your Move Developer's > challenge > Build the coolest Linux based applications with Moblin SDK & win great > prizes > Grand prize is a trip for two to an Open Source event anywhere in the world > http://moblin-contest.org/redirect.php?banner_id=100&url=/ > _______________________________________________ > Cpp-netlib-devel mailing list > Cpp...@li... > https://lists.sourceforge.net/lists/listinfo/cpp-netlib-devel > > |