]> git.stg.codes - stg.git/blobdiff - projects/sgauthstress/proto.h
Remove files copying from interface creation scripts
[stg.git] / projects / sgauthstress / proto.h
index 879e7a35b11a49e3a367842a7de31705bb6429ac..05fe472266ef092f2d6f9539d83a516b4b316b09 100644 (file)
@@ -6,6 +6,7 @@
 #include <poll.h>
 
 #include <string>
+#include <vector>
 #include <map>
 
 #include "stg/os_int.h"
@@ -34,13 +35,15 @@ class PROTO {
 
         bool Connect(uint32_t ip);
         bool Disconnect(uint32_t ip);
+
+        size_t UserCount() const { return users.size(); }
     private:
         BLOWFISH_CTX ctx;
         struct sockaddr_in localAddr;
         struct sockaddr_in serverAddr;
         int timeout;
 
-        std::map<uint32_t, USER> users;
+        std::vector<std::pair<uint32_t, USER> > users;
         std::vector<struct pollfd> pollFds;
 
         bool running;