Merge lp:~tangent-org/libmemcached/1.0-build/ Build: jenkins-Libmemcached-188
[awesomized/libmemcached] / libtest / server_container.h
index 6eadc6d57e31416664ae11c2cabb95a595e1cf76..9e08336594072b2c5b07ad65d6fe227fbe69f08e 100644 (file)
@@ -39,7 +39,8 @@
 #include <cassert>
 #include <cstdio>
 #include <cstring>
-
+#include <netdb.h>
+#include <netinet/in.h>
 #include <string>
 #include <unistd.h>
 #include <vector>
@@ -53,7 +54,6 @@ private:
   std::string server_list;
   bool _socket;
   bool _sasl;
-  uint32_t _count;
   std::string _username;
   std::string _password;
 
@@ -124,6 +124,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;
@@ -134,6 +136,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;
 };