#include <boost/thread/mutex.hpp>
#include <boost/thread/thread.hpp>
#include "include_base_utils.h"
#include "misc_log_ex.h"
#include "storages/levin_abstract_invoke2.h"
#include "common/util.h"
#include "net_load_tests.h"
Go to the source code of this file.
|
| int | main (int argc, char **argv) |
◆ EXIT_ON_ERROR
| #define EXIT_ON_ERROR |
( |
| cond | ) |
|
Value:{
if (!(cond)) {
LOG_PRINT_L0(
"ERROR: " << #cond); exit(1); }
else {} }
Definition at line 44 of file srv.cpp.
◆ main()
| int main |
( |
int | argc, |
|
|
char ** | argv ) |
Definition at line 218 of file srv.cpp.
219{
222
224
225 size_t thread_count = (std::max)(
min_thread_count, boost::thread::hardware_concurrency() / 2);
226
228 if (!tcp_server.init_server(
srv_port,
"127.0.0.1"))
229 return 1;
230
231 srv_levin_commands_handler *commands_handler = new srv_levin_commands_handler(tcp_server);
233 tcp_server.get_config_object().m_invoke_timeout = 10000;
234
235
236 if (!tcp_server.run_server(thread_count, true))
237 return 2;
238 return 0;
240}
void mlog_configure(const std::string &filename_base, bool console, const std::size_t max_log_file_size=MAX_LOG_FILE_SIZE, const std::size_t max_log_files=MAX_LOG_FILES)
std::string mlog_get_default_log_path(const char *default_filename)
#define CATCH_ENTRY_L0(lacation, return_val)
const std::string srv_port("36231")
const unsigned int min_thread_count
epee::net_utils::boosted_tcp_server< test_levin_protocol_handler > test_tcp_server