diff --git a/include/redox/subscriber.hpp b/include/redox/subscriber.hpp index 63a89f4..15ab6bb 100644 --- a/include/redox/subscriber.hpp +++ b/include/redox/subscriber.hpp @@ -58,6 +58,14 @@ class Subscriber { return rdx_.connectUnix(path, connection_callback); } + /** + * Send auth message to server. + * Call this before any subscribe happens + */ + bool auth(const std::string &password) { + return rdx_.commandSync({"AUTH", password}); + } + /** * Same as .stop() on a Redox instance. */