C++ library with basic capabilities of Node.js.

Hi! I was wondering if anyone knew about a built-in C++ library that has the basic capabilities of Node. I do not know Node and Google is generating a lot of noise.
Can you be more specific on what capabilities you are looking for? Node can do many things.
The online communications between different programs like in an online game.
Pretend we don't all know what Node does. Are you seeking a communications protocol library, or just basic comms, or OOP wrapped comms, or something else?
I guarantee you there are many libraries that do what you need.

Probably none of them are "built in", in that they are not part of the C++ specification; you'd have to fetch the library yourself (although Node.js isn't a built-in part of Javascript either, so you're clearly comfortable with external tools/libraries in principle).
If you just want to implement communication between a server and a client, node is hardly necessary. This can be done with many networking libraries. Boost, Qt, SDL, and SFML all have various Socket implementations (personally I'm fond of Qt's). You can even do it yourself with socket(2) and friends.
For something closer to what Node does with websockets, check out Google's Protobuf and gRPC. Protobuf generates de/serialization code from a plain text data description language, while gRPC handles the networking to send and receive Protobuf messages. You can put together a much more robust and efficient communications channel that with just Node and JSON websockets.
I looked at Protobuf and gRPC and am going to try that. Thanks!
Last edited on
Topic archived. No new replies allowed.