text: #pragma once
  #include <atomic>
  #include <string>
  #include "MSNSwitchboard.h"
  #include "ClientInfo.h"
  #include <thread>
  #include <future>
  #include "unordered_map"
  #include <optional>
  #include "MSNSwitchboard.h"
  #include "thread_pool.hpp"
  #include "ITransport.h"
  
  namespace wlmatrix
  {
  class MSNClient {
  	private:
  	    mutable std::shared_timed_mutex rwSwitchboards_;
  		std::promise<void> _matrixSyncLoopExitSignal;
  		std::shared_ptr<ClientInfo> _clientInfo;
  		std::thread _clientListeningThread;
  		std::unordered_map<std::string, std::shared_ptr<MSNSwitchboard>> _switchboards;
  		bool _clientReady = false;
  		std::string _transportID;
  		ITransport* _transport;
  		void startMatrixLoop(int initialPresenceTrid, std::shared_ptr<ClientInfo> client, std::future<void> exitSignal);
  	public:
  		MSNClient(const MSNClient& obj);
  		MSNClient(std::shared_ptr<ClientInfo> info, ITransport* transport, std::string transportID);
  		~MSNClient();
  		void onClientReady(int initialPresenceTrid);
  		void onMessageReceived(std::string message);
  		void sendMessage(std::string messsage);
  		void sendMessages(std::vector<std::string> message);
  		std::shared_ptr<ClientInfo> getClientInfo();
  };
  };