4

I want to make some networking application. I wanted to use Qt, but it's networking library is relatively big and then I tried to learn Boost::asio, but it seems to have the same amount of size

What is a library that has small footprint? As small as can be? Can I use Boost:ASIO or Qt and somehow streamline them to be little in size? I need my application to be smaller than 1MB, (or even smaller if could be)

w4j3d
  • 341
  • 2
  • 6
  • 12
  • What are your requirements on the library? – MikeMB Jul 21 '17 at 15:46
  • simple networking, (e.g. client/server), maybe other features, but I'm just a beginner... I think the basic requirement is applications like these in this page https://theboostcpplibraries.com/boost.asio-network-programming – w4j3d Jul 21 '17 at 16:02
  • 1
    Qt is huge for such a task, and will force you to use its event loop system. Boost ASIO is light-weight and waaaaay more portable. Qt is good for GUI specifically, not for simple stuff like networking. – The Quantum Physicist Jul 21 '17 at 16:19
  • You probably could take only the bits you need from Qt. Use the new configuration system and pretty much turn everything off and only enable the features you need. If you're careful, it might even fit in 1MB. – Kuba hasn't forgotten Monica Jul 21 '17 at 18:02
  • I have a full boost-asio network, with client/server + threading, different "packet" (data) handling, file-transfer, SSL* and the DLL does not even have half a MB (in release mode). You can very well build a good system with boost-asio. Take a look around stackoverflow and the examples on their website. *When using SSL you'll need a few more DLLs, then you might exceed the 1 MB requirement, without SSL it's possible. – Blacktempel Jul 26 '17 at 08:35

1 Answers1

3

You can use the standalone version of asio in header only mode. Or you use the OS interface directly.

MikeMB
  • 20,029
  • 9
  • 57
  • 102
  • can you please tell me how to get that? I don't know which files are which; when I downloaded the package file it included example applications and other things, I don't know which part exactly the library (which are the needed files/folder)? – w4j3d Jul 21 '17 at 15:54
  • 1
    @w4j3d: IIRC there should be a folder called "include", just add that to your include path. Otherwise I'd recommend looking in the documentation. – MikeMB Jul 21 '17 at 16:02