5
* Copyright (C) 2010 DeNA Co.,Ltd.. All rights reserved.
6
* See COPYRIGHT.txt for details.
9
#ifndef DENA_HSTCPSVR_HPP
10
#define DENA_HSTCPSVR_HPP
17
#include "auto_file.hpp"
18
#include "database.hpp"
24
struct hstcpsvr_shared_c {
27
long nb_conn_per_thread;
30
std::string plain_secret;
35
volatile unsigned int *thread_num_conns; /* 0 .. num_threads-1 */
36
hstcpsvr_shared_c() : num_threads(0), nb_conn_per_thread(100),
37
for_write_flag(false), require_auth(false), readsize(0),
38
thread_num_conns(0) { }
41
struct hstcpsvr_shared_v : public mutex {
43
hstcpsvr_shared_v() : shutdown(0) { }
47
typedef std::auto_ptr<hstcpsvr_i> hstcpsvr_ptr;
50
virtual ~hstcpsvr_i() { }
51
virtual std::string start_listen() = 0;
52
static hstcpsvr_ptr create(const config& conf);