18#ifndef TRINITYCORE_HTTP_SSL_SOCKET_H
19#define TRINITYCORE_HTTP_SSL_SOCKET_H
23#include <boost/beast/core/stream_traits.hpp>
24#include <boost/beast/core/tcp_stream.hpp>
25#include <boost/beast/ssl/ssl_stream.hpp>
36 void shutdown(boost::asio::socket_base::shutdown_type what, boost::system::error_code& shutdownError)
39 boost::beast::get_lowest_layer(
_sslSocket).socket().shutdown(what, shutdownError);
42 void close(boost::system::error_code& )
44 boost::beast::get_lowest_layer(
_sslSocket).close();
49 return boost::beast::get_lowest_layer(
_sslSocket).socket().remote_endpoint();
54template <
typename Derived>
60 explicit SslSocket(boost::asio::ip::tcp::socket&& socket, boost::asio::ssl::context& sslContext)
78 [self = this->shared_from_this()](boost::system::error_code
const& error) { self->HandshakeHandler(error); });
#define TC_LOG_ERROR(filterType__, message__,...)
Impl::BoostBeastSslSocketWrapper & underlying_stream()
boost::beast::ssl_stream< boost::beast::tcp_stream > _sslSocket
std::string GetClientInfo() const override
void close(boost::system::error_code &)
void shutdown(boost::asio::socket_base::shutdown_type what, boost::system::error_code &shutdownError)
boost::asio::ip::tcp::socket::endpoint_type remote_endpoint() const
SslSocket & operator=(SslSocket const &other)=delete
SslSocket(boost::asio::ip::tcp::socket &&socket, boost::asio::ssl::context &sslContext)
SslSocket(SslSocket &&other)=delete
SslSocket & operator=(SslSocket &&other)=delete
SslSocket(SslSocket const &other)=delete
void HandshakeHandler(boost::system::error_code const &error)