How kguibene/natscpp works
natspp is a small embeddable C++ NATS client. An application connects through the client API; the runtime performs the INFO/CONNECT handshake, sends publish and subscription commands, dispatches received messages to handlers, and can block until stopped. The README also describes a demo that exercises these operations. The graph focuses on the library’s runtime; the demo is omitted as an example application. The source excerpts show socket and dispatch behavior, but do not establish broader NATS-server capabilities such as TLS or authentication.
Main entry points: nats.cpp Client Runtime · nats.hpp Client API
Components 4
Other components
- Application
- Client API
include/nats.hpp - Client Runtime
src/nats.cpp - NATS Server
Connections 5
- Application → Client API: calls
- Client API → Client Runtime: implemented by
src/nats.cpp - Client Runtime → NATS Server: sends protocol commands
src/nats.cpp - NATS Server → Client Runtime: sends protocol messages
src/nats.cpp - Client Runtime → Application: dispatches callbacks
src/nats.cpp