xrpld
Toggle main menu visibility
Loading...
Searching...
No Matches
xrpld
app
misc
detail
WorkSSL.h
1
#pragma once
2
3
#include <xrpld/app/misc/detail/WorkBase.h>
4
#include <xrpld/core/Config.h>
5
6
#include <xrpl/beast/utility/Journal.h>
7
#include <xrpl/net/HTTPClientSSLContext.h>
8
9
#include <boost/asio/ssl.hpp>
10
11
#include <
memory
>
12
#include <
string
>
13
14
namespace
xrpl::detail
{
15
16
// Work over SSL
17
class
WorkSSL
:
public
WorkBase
<WorkSSL>,
public
std::enable_shared_from_this
<WorkSSL>
18
{
19
friend
class
WorkBase
<
WorkSSL
>;
20
21
private
:
22
using
StreamType
= boost::asio::ssl::stream<SocketType&>;
23
24
HTTPClientSSLContext
context_
;
25
StreamType
stream_
;
26
27
public
:
28
WorkSSL
(
29
std::string
const
& host,
30
std::string
const
&
path
,
31
std::string
const
& port,
32
boost::asio::io_context& ios,
33
beast::Journal
j,
34
Config
const
& config,
35
EndpointType
const
& lastEndpoint,
36
bool
lastStatus,
37
CallbackType
cb);
38
~WorkSSL
()
override
=
default
;
39
40
private
:
41
StreamType
&
42
stream
()
43
{
44
return
stream_
;
45
}
46
47
void
48
onConnect
(
ErrorCode
const
& ec);
49
50
void
51
onHandshake
(
ErrorCode
const
& ec);
52
};
53
54
}
// namespace xrpl::detail
std::string
beast::Journal
A generic endpoint for log messages.
Definition
Journal.h:44
xrpl::Config
Definition
src/xrpld/core/Config.h:89
xrpl::HTTPClientSSLContext
Definition
HTTPClientSSLContext.h:23
xrpl::detail::WorkBase< WorkSSL >::ErrorCode
boost::system::error_code ErrorCode
Definition
WorkBase.h:26
xrpl::detail::WorkBase< WorkSSL >::WorkBase
WorkBase(std::string host, std::string path, std::string port, boost::asio::io_context &ios, EndpointType lastEndpoint, bool lastStatus, CallbackType cb)
Definition
WorkBase.h:105
xrpl::detail::WorkBase< WorkSSL >::EndpointType
boost::asio::ip::tcp::endpoint EndpointType
Definition
WorkBase.h:27
xrpl::detail::WorkBase< WorkSSL >::CallbackType
std::function< void(ErrorCode const &, EndpointType const &, ResponseType &&)> CallbackType
Definition
WorkBase.h:30
xrpl::detail::WorkSSL::stream_
StreamType stream_
Definition
WorkSSL.h:25
xrpl::detail::WorkSSL::~WorkSSL
~WorkSSL() override=default
xrpl::detail::WorkSSL::onHandshake
void onHandshake(ErrorCode const &ec)
Definition
WorkSSL.cpp:61
xrpl::detail::WorkSSL::StreamType
boost::asio::ssl::stream< SocketType & > StreamType
Definition
WorkSSL.h:22
xrpl::detail::WorkSSL::context_
HTTPClientSSLContext context_
Definition
WorkSSL.h:24
xrpl::detail::WorkSSL::onConnect
void onConnect(ErrorCode const &ec)
Definition
WorkSSL.cpp:45
xrpl::detail::WorkSSL::WorkSSL
WorkSSL(std::string const &host, std::string const &path, std::string const &port, boost::asio::io_context &ios, beast::Journal j, Config const &config, EndpointType const &lastEndpoint, bool lastStatus, CallbackType cb)
Definition
WorkSSL.cpp:20
xrpl::detail::WorkSSL::stream
StreamType & stream()
Definition
WorkSSL.h:42
std::enable_shared_from_this
memory
xrpl::detail
Definition
base_uint.h:37
xrpl::path
Definition
FlowDebugInfo.h:21
string
Generated by
1.17.0