21 explicit Server(std::string listenAddr);
47 std::
string listenAddr_;
48 zmq::context_t context_;
49 zmq::socket_t socket_;
52 std::thread serverThread_;
68 [[nodiscard]] auto handleRequest_(const zmq::message_t& request)
77 virtual auto addUser_(const std::
string& username,
78 const std::
string& password) ->
bool;
85 virtual auto removeUser_(const std::
string& username) ->
bool;
92 [[nodiscard]] virtual auto isExistUser_(const std::
string& username) ->
bool;
98 [[nodiscard]] virtual auto listAllUsers() -> std::vector<std::
string>;
106 virtual auto authenticateUser_(const std::
string& username,
107 const std::
string& password) ->
bool;
115 virtual auto addUserTag_(const std::
string& username, const std::
string& tag)
124 virtual auto removeUserTag_(const std::
string& username,
125 const std::
string& tag) ->
bool;
132 [[nodiscard]] virtual auto getUserTags_(const std::
string& username)
133 -> std::vector<std::
string>;
142 virtual auto sendMessage_(const std::
string& from, const std::
string& to,
143 const std::
string& message) ->
bool;
150 [[nodiscard]] virtual auto getSentMessages_(const std::
string& username)
151 -> std::vector<std::
string>;
158 [[nodiscard]] virtual auto getReceivedMessages_(const std::
string& username)
159 -> std::vector<std::
string>;
166 [[nodiscard]] virtual auto getPair_(const std::
string& username)
167 -> std::vector<std::
string>;