20
20
#include < arpa/inet.h>
21
21
#include < netinet/tcp.h>
22
22
23
+ #include < pthread.h>
24
+ #include < sys/file.h>
23
25
#include < csignal>
24
26
#include < cstdio>
25
27
#include < cstdlib>
26
28
#include < cstring>
27
29
#include < vector>
28
- #include < pthread.h>
29
- #include < sys/file.h>
30
30
31
+ #include " common/container/lock_free_queue.h"
31
32
#include " common/exception.h"
32
33
#include " common/logger.h"
33
- #include " common/container/lock_free_queue.h"
34
- #include " notifiable_task.h"
35
34
#include " connection_dispatcher_task.h"
36
- #include " protocol_handler.h"
37
35
#include " network_state.h"
36
+ #include " notifiable_task.h"
37
+ #include " protocol_handler.h"
38
38
39
- #include < openssl/ssl .h>
39
+ #include < openssl/crypto .h>
40
40
#include < openssl/err.h>
41
+ #include < openssl/ssl.h>
41
42
#include < openssl/x509.h>
42
43
#include < openssl/x509_vfy.h>
43
- #include < openssl/crypto.h>
44
44
45
45
namespace peloton {
46
46
namespace network {
@@ -58,8 +58,6 @@ class PelotonServer {
58
58
*/
59
59
PelotonServer ();
60
60
61
-
62
-
63
61
/* *
64
62
* @brief Configure the server to spin up all its threads and start listening
65
63
* on the configured port.
@@ -98,7 +96,6 @@ class PelotonServer {
98
96
// TODO(tianyu): This is VILE. Fix this when we refactor testing.
99
97
void SetPort (int new_port);
100
98
101
-
102
99
static void LoadSSLFileSettings ();
103
100
104
101
static void SSLInit ();
@@ -109,7 +106,7 @@ class PelotonServer {
109
106
110
107
static SSLLevel GetSSLLevel () { return ssl_level_; }
111
108
112
- static void SSLLockingFunction (int mode, int n, const char * file, int line);
109
+ static void SSLLockingFunction (int mode, int n, const char * file, int line);
113
110
114
111
static unsigned long SSLIdFunction (void );
115
112
@@ -135,13 +132,11 @@ class PelotonServer {
135
132
136
133
std::shared_ptr<ConnectionDispatcherTask> dispatcher_task;
137
134
138
-
139
-
140
- template <typename ... Ts>
141
- void TrySslOperation (int (*func)(Ts...), Ts... arg);
135
+ template <typename ... Ts>
136
+ void TrySslOperation (int (*func)(Ts...), Ts... arg);
142
137
143
138
// For testing purposes
144
139
std::shared_ptr<ConnectionDispatcherTask> dispatcher_task_;
145
140
};
146
- }
147
- }
141
+ } // namespace network
142
+ } // namespace peloton
0 commit comments