extract a new class SslClient

This commit is contained in:
Chunting Gu
2021-06-23 10:03:11 +08:00
parent 326a3ea215
commit d294cda3c1
13 changed files with 410 additions and 281 deletions
+30
View File
@@ -0,0 +1,30 @@
#ifndef WEBCC_SSL_CLIENT_H_
#define WEBCC_SSL_CLIENT_H_
#include "webcc/client.h"
#include "boost/asio/ssl/context.hpp"
#if !WEBCC_ENABLE_SSL
#error SSL must be enabled!
#endif
namespace webcc {
class SslClient final : public Client {
public:
SslClient(boost::asio::io_context& io_context,
boost::asio::ssl::context& ssl_context);
~SslClient() = default;
protected:
void AsyncConnect() override;
private:
boost::asio::ssl::context& ssl_context_;
};
} // namespace webcc
#endif // WEBCC_SSL_CLIENT_H_