YAMI4 Core
options.h
1 // Copyright Maciej Sobczak 2008-2019.
2 // This file is part of YAMI4.
3 //
4 // YAMI4 is free software: you can redistribute it and/or modify
5 // it under the terms of the GNU General Public License as published by
6 // the Free Software Foundation, either version 3 of the License, or
7 // (at your option) any later version.
8 //
9 // YAMI4 is distributed in the hope that it will be useful,
10 // but WITHOUT ANY WARRANTY; without even the implied warranty of
11 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 // GNU General Public License for more details.
13 //
14 // You should have received a copy of the GNU General Public License
15 // along with YAMI4. If not, see <http://www.gnu.org/licenses/>.
16 
17 #ifndef YAMICORE_OPTIONS_H_INCLUDED
18 #define YAMICORE_OPTIONS_H_INCLUDED
19 
20 #include "core.h"
21 
22 namespace yami
23 {
24 
25 namespace core
26 {
27 class parameters;
28 } // namespace core
29 
30 namespace details
31 {
32 
33 #ifdef YAMI4_WITH_OPEN_SSL
34 const std::size_t max_file_path_len = 200;
35 #endif // YAMI4_WITH_OPEN_SSL
36 
37 struct options
38 {
39  void init(const core::parameters * params);
40 
41  void override_with_user_values(const core::parameters * params);
42 
43  int tcp_listen_backlog;
44  bool tcp_reuseaddr;
45  bool tcp_nonblocking;
46  std::size_t tcp_connect_timeout;
47  bool tcp_nodelay;
48  bool tcp_keepalive;
49  std::size_t tcp_frame_size;
50 
51  std::size_t udp_frame_size;
52 
53  int unix_listen_backlog;
54  bool unix_nonblocking;
55  std::size_t unix_frame_size;
56 
57  bool file_nonblocking;
58  std::size_t file_frame_size;
59 
60 #ifdef YAMI4_WITH_QNX
61  std::size_t qnx_frame_size;
62 #endif // YAMI4_WITH_QNX
63 
64 #ifdef YAMI4_WITH_OPEN_SSL
65  char ssl_certificate_file[max_file_path_len];
66  char ssl_private_key_file[max_file_path_len];
67 #endif // YAMI4_WITH_OPEN_SSL
68 };
69 
70 } // namespace details
71 
72 } // namespace yami
73 
74 #endif // YAMICORE_OPTIONS_H_INCLUDED
Namespace devoted for everything related to YAMI4.
Definition: agent.h:25