mirror of
https://github.com/Icinga/icinga2.git
synced 2025-07-23 21:55:03 +02:00
Turn shortcut UnbufferedAsioTlsStream::Parent into a base class
This commit is contained in:
parent
f4193e40a1
commit
7ec1e638a8
@ -106,11 +106,10 @@ struct UnbufferedAsioTlsStreamParams
|
|||||||
const String& Hostname;
|
const String& Hostname;
|
||||||
};
|
};
|
||||||
|
|
||||||
class UnbufferedAsioTlsStream : public boost::asio::ssl::stream<boost::asio::ip::tcp::socket>
|
typedef boost::asio::ssl::stream<boost::asio::ip::tcp::socket> AsioTcpTlsStream;
|
||||||
{
|
|
||||||
private:
|
|
||||||
typedef boost::asio::ssl::stream<boost::asio::ip::tcp::socket> Parent;
|
|
||||||
|
|
||||||
|
class UnbufferedAsioTlsStream : public AsioTcpTlsStream
|
||||||
|
{
|
||||||
public:
|
public:
|
||||||
inline
|
inline
|
||||||
UnbufferedAsioTlsStream(UnbufferedAsioTlsStreamParams& init)
|
UnbufferedAsioTlsStream(UnbufferedAsioTlsStreamParams& init)
|
||||||
@ -123,20 +122,20 @@ public:
|
|||||||
|
|
||||||
template<class... Args>
|
template<class... Args>
|
||||||
inline
|
inline
|
||||||
auto async_handshake(handshake_type type, Args&&... args) -> decltype(Parent::async_handshake(type, std::forward<Args>(args)...))
|
auto async_handshake(handshake_type type, Args&&... args) -> decltype(AsioTcpTlsStream::async_handshake(type, std::forward<Args>(args)...))
|
||||||
{
|
{
|
||||||
BeforeHandshake(type);
|
BeforeHandshake(type);
|
||||||
|
|
||||||
return Parent::async_handshake(type, std::forward<Args>(args)...);
|
return AsioTcpTlsStream::async_handshake(type, std::forward<Args>(args)...);
|
||||||
}
|
}
|
||||||
|
|
||||||
template<class... Args>
|
template<class... Args>
|
||||||
inline
|
inline
|
||||||
auto handshake(handshake_type type, Args&&... args) -> decltype(Parent::handshake(type, std::forward<Args>(args)...))
|
auto handshake(handshake_type type, Args&&... args) -> decltype(AsioTcpTlsStream::handshake(type, std::forward<Args>(args)...))
|
||||||
{
|
{
|
||||||
BeforeHandshake(type);
|
BeforeHandshake(type);
|
||||||
|
|
||||||
return Parent::handshake(type, std::forward<Args>(args)...);
|
return AsioTcpTlsStream::handshake(type, std::forward<Args>(args)...);
|
||||||
}
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user