projects
/
awesomized
/
libmemcached
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
|
github
raw
|
inline
| side by side
Fix for unistd (https://launchpad.net/~michael-fladi)
[awesomized/libmemcached]
/
libtest
/
server_container.h
diff --git
a/libtest/server_container.h
b/libtest/server_container.h
index 4e81dafd27af310f22db1bf91ddd62160adebacb..c65065aa1eb53113844b5d1330f8f22f901f4229 100644
(file)
--- a/
libtest/server_container.h
+++ b/
libtest/server_container.h
@@
-35,6
+35,7
@@
namespace libtest {
class server_startup_st
{
private:
class server_startup_st
{
private:
+ uint64_t _magic;
std::string server_list;
bool _socket;
bool _sasl;
std::string server_list;
bool _socket;
bool _sasl;
@@
-47,23
+48,16
@@
public:
uint8_t udp;
std::vector<Server *> servers;
uint8_t udp;
std::vector<Server *> servers;
- server_startup_st() :
- _socket(false),
- _sasl(false),
- _count(5),
- udp(0)
- { }
+ server_startup_st();
+ ~server_startup_st();
+
+ bool validate();
bool start_socket_server(const std::string& server_type, const in_port_t try_port, int argc, const char *argv[]);
uint32_t count() const
{
bool start_socket_server(const std::string& server_type, const in_port_t try_port, int argc, const char *argv[]);
uint32_t count() const
{
- return _count;
- }
-
- void set_count(uint32_t arg)
- {
- _count= arg;
+ return servers.size();
}
void restart();
}
void restart();
@@
-80,11
+74,6
@@
public:
return _username;
}
return _username;
}
-
- bool is_debug() const;
- bool is_helgrind() const;
- bool is_valgrind() const;
-
bool socket()
{
return _socket;
bool socket()
{
return _socket;
@@
-109,15
+98,28
@@
public:
void shutdown_and_remove();
void shutdown_and_remove();
-
void
shutdown();
+
bool
shutdown();
bool shutdown(uint32_t number_of_host);
bool shutdown(uint32_t number_of_host);
+ bool check() const;
+
void push_server(Server *);
Server *pop_server();
void push_server(Server *);
Server *pop_server();
- ~server_startup_st();
+ unsigned long int servers_to_run() const
+ {
+ return _servers_to_run;
+ }
+
+ void set_servers_to_run(unsigned long int arg)
+ {
+ _servers_to_run= arg;
+ }
+
+private:
+ unsigned long int _servers_to_run;
};
};
-bool server_startup(server_startup_st&, const std::string&, in_port_t try_port, int argc, const char *argv[]);
+bool server_startup(server_startup_st&, const std::string&, in_port_t try_port, int argc, const char *argv[]
, const bool opt_startup_message= true
);
} // namespace libtest
} // namespace libtest