-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfig.h
64 lines (51 loc) · 1.38 KB
/
config.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
#ifndef TUNA_CONFIG_H
#define TUNA_CONFIG_H
#include <boost/program_options.hpp>
#include "smux-cpp/utils.h"
//DECLARE_string(localaddr);
//DECLARE_string(remoteaddr);
//DECLARE_string(targetaddr);
//DECLARE_string(key);
//DECLARE_string(crypt);
//DECLARE_string(mode);
//DECLARE_string(logfile);
//
//DECLARE_int32(conn);
//DECLARE_int32(autoexpire);
//DECLARE_int32(mtu);
//DECLARE_int32(scavengettl);
//DECLARE_int32(sndwnd);
//DECLARE_int32(rcvwnd);
//DECLARE_int32(datashard);
//DECLARE_int32(parityshard);
//DECLARE_int32(dscp);
//DECLARE_int32(nodelay);
//DECLARE_int32(resend);
//DECLARE_int32(nc);
//DECLARE_int32(sockbuf);
//DECLARE_int32(keepalive);
//DECLARE_int32(interval);
//
//DECLARE_bool(kvar);
//DECLARE_bool(nocomp);
//DECLARE_bool(acknodelay);
//DECLARE_string(remoteaddr);
//DECLARE_string(localaddr);
//DECLARE_string(price);
//DECLARE_string(beneficiary_addr);
//DECLARE_string(pubkey);
//DECLARE_string(seed);
//DECLARE_uint32(serviceid);
namespace po = boost::program_options;
using namespace std;
template<class T>
ostream &operator<<(ostream &os, const vector<T> &v) {
copy(v.begin(), v.end(), ostream_iterator<T>(os, " "));
return os;
}
void parse_command_lines(int argc, char **argv);
po::variables_map parse(int argc, char *argv[]);
std::string get_host(const std::string &addr);
std::string get_port(const std::string &addr);
void process_configs();
#endif