diff --git a/include/transport/networkpluginserver.h b/include/transport/networkpluginserver.h index 05f99c61389a5a5ca11e122a59f301770f838e8c..7f89d7569fd4a4afd84d3a77033887d33f115546 100644 --- a/include/transport/networkpluginserver.h +++ b/include/transport/networkpluginserver.h @@ -40,6 +40,12 @@ class NetworkConversation; class NetworkPluginServer { public: + struct Client { + bool pongReceived; + std::list users; + std::string data; + }; + NetworkPluginServer(Component *component, Config *config, UserManager *userManager); virtual ~NetworkPluginServer(); @@ -67,15 +73,13 @@ class NetworkPluginServer { void send(boost::shared_ptr &, const std::string &data); void pingTimeout(); - void sendPing(); + void sendPing(boost::shared_ptr c); + boost::shared_ptr getFreeClient(); - std::string m_command; - std::string m_data; UserManager *m_userManager; Config *m_config; boost::shared_ptr m_server; - boost::shared_ptr m_client; - bool m_pongReceived; + std::map, Client > m_clients; Swift::Timer::ref m_pingTimer; };