Line data Source code
1 : // Copyright (c) 2012-2021 Made to Order Software Corp. All Rights Reserved
2 : //
3 : // https://snapwebsites.org/project/eventdispatcher
4 : // contact@m2osw.com
5 : //
6 : // This program is free software; you can redistribute it and/or modify
7 : // it under the terms of the GNU General Public License as published by
8 : // the Free Software Foundation; either version 2 of the License, or
9 : // (at your option) any later version.
10 : //
11 : // This program is distributed in the hope that it will be useful,
12 : // but WITHOUT ANY WARRANTY; without even the implied warranty of
13 : // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 : // GNU General Public License for more details.
15 : //
16 : // You should have received a copy of the GNU General Public License
17 : // along with this program; if not, write to the Free Software
18 : // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
19 : #pragma once
20 :
21 : /** \file
22 : * \brief Event dispatch class.
23 : *
24 : * Class used to handle events.
25 : */
26 :
27 : // make sure we use OpenSSL with multi-thread support
28 : // (TODO: move to .cpp once we have the impl!)
29 : #define OPENSSL_THREAD_DEFINES
30 :
31 : // C++ lib
32 : //
33 : #include <memory>
34 :
35 :
36 : // OpenSSL lib
37 : //
38 : #include <openssl/ssl.h>
39 :
40 :
41 :
42 : namespace ed
43 : {
44 :
45 :
46 : namespace detail
47 : {
48 :
49 :
50 : // shared with the tcp_biod_server
51 0 : class tcp_bio_client_impl
52 : {
53 : public:
54 : std::shared_ptr<SSL_CTX> f_ssl_ctx = std::shared_ptr<SSL_CTX>();
55 : std::shared_ptr<BIO> f_bio = std::shared_ptr<BIO>();
56 : };
57 :
58 :
59 : void bio_cleanup();
60 : void bio_deleter(BIO * bio);
61 : void bio_initialize();
62 : int bio_log_errors();
63 : void per_thread_cleanup();
64 : void ssl_ctx_deleter(SSL_CTX * ssl_ctx);
65 : void thread_cleanup();
66 :
67 :
68 : }
69 : // namespace detail
70 :
71 :
72 : } // namespace ed
73 : // vim: ts=4 sw=4 et
|