10
10
#include < memory>
11
11
#include < cstdint>
12
12
#include < functional>
13
- #include < asio/io_service.hpp>
14
- #include < asio/ssl.hpp>
13
+ #include < boost/ asio/io_service.hpp>
14
+ #include < boost/ asio/ssl.hpp>
15
15
#include < boost/network/protocol/http/client/connection/connection_delegate.hpp>
16
16
#include < boost/network/support/is_default_string.hpp>
17
17
#include < boost/network/support/is_default_wstring.hpp>
@@ -24,45 +24,45 @@ namespace impl {
24
24
25
25
struct ssl_delegate : public connection_delegate ,
26
26
public std::enable_shared_from_this<ssl_delegate> {
27
- ssl_delegate (::asio::io_service &service, bool always_verify_peer,
27
+ ssl_delegate (boost ::asio::io_service &service, bool always_verify_peer,
28
28
optional<std::string> certificate_filename,
29
29
optional<std::string> verify_path,
30
30
optional<std::string> certificate_file,
31
31
optional<std::string> private_key_file,
32
32
optional<std::string> ciphers,
33
33
optional<std::string> sni_hostname, long ssl_options);
34
34
35
- void connect (::asio::ip::tcp::endpoint &endpoint, std::string host,
35
+ void connect (boost ::asio::ip::tcp::endpoint &endpoint, std::string host,
36
36
std::uint16_t source_port,
37
- std::function<void (std ::error_code const &)> handler) override ;
37
+ std::function<void (boost::system ::error_code const &)> handler) override ;
38
38
void write (
39
- ::asio::streambuf &command_streambuf,
40
- std::function<void (std ::error_code const &, size_t )> handler) override ;
39
+ boost ::asio::streambuf &command_streambuf,
40
+ std::function<void (boost::system ::error_code const &, size_t )> handler) override ;
41
41
void read_some (
42
- ::asio::mutable_buffers_1 const &read_buffer,
43
- std::function<void (std ::error_code const &, size_t )> handler) override ;
42
+ boost ::asio::mutable_buffers_1 const &read_buffer,
43
+ std::function<void (boost::system ::error_code const &, size_t )> handler) override ;
44
44
void disconnect () override ;
45
45
~ssl_delegate () override ;
46
46
47
47
private:
48
- ::asio::io_service &service_;
48
+ boost ::asio::io_service &service_;
49
49
optional<std::string> certificate_filename_;
50
50
optional<std::string> verify_path_;
51
51
optional<std::string> certificate_file_;
52
52
optional<std::string> private_key_file_;
53
53
optional<std::string> ciphers_;
54
54
optional<std::string> sni_hostname_;
55
55
long ssl_options_;
56
- std::unique_ptr<::asio::ssl::context> context_;
57
- std::unique_ptr<::asio::ip::tcp::socket> tcp_socket_;
58
- std::unique_ptr<::asio::ssl::stream<::asio::ip::tcp::socket &> > socket_;
56
+ std::unique_ptr<boost ::asio::ssl::context> context_;
57
+ std::unique_ptr<boost ::asio::ip::tcp::socket> tcp_socket_;
58
+ std::unique_ptr<boost ::asio::ssl::stream<boost ::asio::ip::tcp::socket &> > socket_;
59
59
bool always_verify_peer_;
60
60
61
61
ssl_delegate (ssl_delegate const &); // = delete
62
62
ssl_delegate &operator =(ssl_delegate); // = delete
63
63
64
- void handle_connected (std ::error_code const &ec,
65
- std::function<void (std ::error_code const &)> handler);
64
+ void handle_connected (boost::system ::error_code const &ec,
65
+ std::function<void (boost::system ::error_code const &)> handler);
66
66
};
67
67
68
68
} // namespace impl
0 commit comments