Boost::asio, complexity

Hello everyone. I've been using Boost::Asio recently for tasks that one would often use languages such as Python or Perl for (e.g. sending GET requests), but I use C++ and ASIO since: 1) I need substantial speed 2) I just like C++ However, I notice that even though Asio works wonderfully for larger, asynchronous projects, it gets in the way while doing smaller, more routine tasks. And, asio also is not a miniscule library and when creating binaries, one is often including things he/she wouldn't need. So, I wrote a small library (<500 LOC) that basically lets you pretend that a socket is a stream and you can use it like std::cout and std::cin. Would anyone consider having this included in the Boost repository, or even merged with Asio (the former is preferable because of the binary size reason)? It currently works on Linux, and I'm working on compatibility with Windows. An example of code you can write with it: http://ideone.com/2GHe5 (GETs data from google.com) Right now, all calls are blocking, so that non-blocking can be done with Asio, which is more powerful.

On Mar 6, 2011, at 2:11 PM, Dhaivat Pandya wrote:
[... snip ...] So, I wrote a small library (<500 LOC) that basically lets you pretend that a socket is a stream and you can use it like std::cout and std::cin. Would anyone consider having this included in the Boost repository
Have you looked at boost::iostreams::file_descriptor_sink and _source?

Yes I have. My problem with Boost::Iostreams is still the same, it is a
large library, and I wouldn't use 1% of it. I understand this may not be a
legitimate reason to include a smaller library that does something similar
to a larger one in the Boost repos, but if you guys considered it, that
would be nice.
On Sun, Mar 6, 2011 at 1:42 PM, Kim Barrett
boost::iostreams::file_descriptor_sink

However, I notice that even though Asio works wonderfully for larger, asynchronous projects, it gets in the way while doing smaller, more routine tasks.
Take a look at these examples: http://www.boost.org/doc/libs/1_46_0/doc/html/boost_asio/example/iostreams/d... http://www.boost.org/doc/libs/1_46_0/doc/html/boost_asio/example/iostreams/d...
And, asio also is not a miniscule library and when creating binaries, one is often including things he/she wouldn't need.
What exactly? IMHO, asio is pretty modular, so you include and compile just what you want. Eg, if you don't include the ssl part or timers - you don't have them in your binary.
So, I wrote a small library (<500 LOC) that basically lets you pretend that a socket is a stream and you can use it like std::cout and std::cin.
Could you please elaborate a bit on how it's different from the ASIO tcp::iostream?

I think what you guys are saying is true. I guess there really isn't a need
for another library in the Boost ecosystem. Thank you all for looking at it,
however.
On Sun, Mar 6, 2011 at 1:59 PM, Igor R
However, I notice that even though Asio works wonderfully for larger, asynchronous projects, it gets in the way while doing smaller, more routine tasks.
Take a look at these examples:
http://www.boost.org/doc/libs/1_46_0/doc/html/boost_asio/example/iostreams/d...
http://www.boost.org/doc/libs/1_46_0/doc/html/boost_asio/example/iostreams/d...
And, asio also is not a miniscule library and when creating binaries, one is often including things he/she wouldn't need.
What exactly? IMHO, asio is pretty modular, so you include and compile just what you want. Eg, if you don't include the ssl part or timers - you don't have them in your binary.
So, I wrote a small library (<500 LOC) that basically lets you pretend that a socket is a stream and you can use it like std::cout and std::cin.
Could you please elaborate a bit on how it's different from the ASIO tcp::iostream? _______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users

Hello everyone. I've been using Boost::Asio recently for tasks that one would often use languages such as Python or Perl for (e.g. sending GET requests), but I use C++ and ASIO since:
1) I need substantial speed 2) I just like C++
However, I notice that even though Asio works wonderfully for larger, ... Right now, all calls are blocking, so that non-blocking can be done with Asio, which is more powerful.
hi, Especially for HTTP there is the cpp-netlib, which plans to go in the review for boost, as soon as Version 1.0 is finished. 2. or 3. Quater I guess. http://cpp-netlib.blogspot.com/ regards, Jens Weller -- NEU: FreePhone - kostenlos mobil telefonieren und surfen! Jetzt informieren: http://www.gmx.net/de/go/freephone
participants (4)
-
Dhaivat Pandya
-
Igor R
-
Jens Weller
-
Kim Barrett