Update for mingw compile.
[awesomized/libmemcached] / libtest / server_container.h
index a0287e6d6ee7ffea2164fc72791ec280376612d6..48d9090155647e00d84b3b40b6cf232c99b2a396 100644 (file)
 #include <cassert>
 #include <cstdio>
 #include <cstring>
+
 #include <netdb.h>
 #include <netinet/in.h>
+
 #include <string>
 #include <unistd.h>
 #include <vector>
@@ -54,7 +56,6 @@ private:
   std::string server_list;
   bool _socket;
   bool _sasl;
-  uint32_t _count;
   std::string _username;
   std::string _password;
 
@@ -73,7 +74,7 @@ public:
 
   uint32_t count() const
   {
-    return servers.size();
+    return uint32_t(servers.size());
   }
 
   void restart();
@@ -125,6 +126,8 @@ public:
   Server* last();
   Server *pop_server();
 
+  Server* create(const std::string& server_type, in_port_t try_port, const bool is_socket);
+
   unsigned long int servers_to_run() const
   {
     return _servers_to_run;
@@ -135,6 +138,13 @@ public:
     _servers_to_run= arg;
   }
 
+private:
+  bool _start_server(const bool is_socket,
+                     const std::string& server_type,
+                     const in_port_t try_port,
+                     int argc, const char *argv[],
+                     const bool opt_startup_message);
+
 private:
   unsigned long int _servers_to_run;
 };