Able to send and receive messages, server panicking and not relaying userids yet
This commit is contained in:
@@ -5,6 +5,7 @@
|
||||
#include "services.grpc.pb.h"
|
||||
#include <grpcpp/server_context.h>
|
||||
#include <grpcpp/support/server_callback.h>
|
||||
#include <map>
|
||||
|
||||
class Service : public chat::Chat::CallbackService {
|
||||
public:
|
||||
@@ -14,7 +15,7 @@ public:
|
||||
void sendToAll(const chat::chatMsg &msg);
|
||||
|
||||
private:
|
||||
std::vector<ChatReactor *> m_clients;
|
||||
std::map<std::string, ChatReactor *> m_clients;
|
||||
absl::Mutex m_mu;
|
||||
std::vector<chat::chatMsg> m_messages ABSL_GUARDED_BY(m_mu);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user