Why did I decide to use MsgPack?
Compared to std::stringstream:
* All std::streams are just passing through bytes, they don't really serialize or deserialize data structures
* You would have to make your own encoding based on ASCII chars and that isn't space efficient
Compared to Google Protocol Buffers:
* Define message formats in a .proto file.
* Use the protocol buffer compiler. (Not needed with MsgPack)
* Use a C++ API to write and read messages. (There's no getting around it)
* It supports more container types, but less primitive types than MsgPack
* Write a Thrift IDL file and use the code generator. (Not needed with MsgPack)
* It is just a personal preference of mine but I don't like Boost. It is just redundant because we already have the std::lib.
* I don't overlook the documentation. But it seems to have similar features compared to MsgPack.
All in all, what makes MsgPack unique?
* It is like the widespread JSON, but binary.
* Data and types are encapsulated: e.g. You don't have to worry how a number is stored,
the serializer decides to use (u)int8/16/32/64 or float32/64.
* The data flow is controllable. You can feed to deserializer with small pieces of data and
will get the results immediately without having to wait until an entire packet is deserialized.
What about sockets and connectivity?
* They are plain C, no OOP
, just ugly function calls with to many parameters or structures.
* Well again: It is boost and I consequently avoid it.
* It is not open source and has a commercial license.
* But it is especially made for games.
Compared to ClanLib:
* It is more like a entire game engine, not just a networking library.
* It doesn't seem to have as many features as my library has, for example: UDP multicast and broadcast are missing.
All in all, what makes my netLink unique?
* It is OOP, easy to use, light-weight and you don't have to care about stuff like select() or blocking.
* You can use it with std::streams for I/O or call the base functionality directly (multiple abstraction layers).
* It supports IPv4 and the coming IPv6.
* It is written in C++11 and LLVM compiled, so it is more efficient than older versions