TrinityCore
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
SslSocket< SslContext > Class Template Reference

#include <SslSocket.h>

Public Member Functions

 SslSocket (tcp::socket &&socket)
 
void close (boost::system::error_code &error)
 
void shutdown (boost::asio::socket_base::shutdown_type what, boost::system::error_code &shutdownError)
 
template<typename MutableBufferSequence , typename ReadHandlerType >
void async_read_some (MutableBufferSequence const &buffers, ReadHandlerType &&handler)
 
template<typename ConstBufferSequence , typename WriteHandlerType >
void async_write_some (ConstBufferSequence const &buffers, WriteHandlerType &&handler)
 
template<typename ConstBufferSequence >
std::size_t write_some (ConstBufferSequence const &buffers, boost::system::error_code &error)
 
template<typename SettableSocketOption >
void set_option (SettableSocketOption const &option, boost::system::error_code &error)
 
tcp::socket::endpoint_type remote_endpoint () const
 
template<typename HandshakeHandlerType >
void async_handshake (boostssl::stream_base::handshake_type type, HandshakeHandlerType &&handler)
 

Private Attributes

tcp::socket _socket
 
boostssl::stream< tcp::socket & > _sslSocket
 

Constructor & Destructor Documentation

template<class SslContext >
SslSocket< SslContext >::SslSocket ( tcp::socket &&  socket)
inlineexplicit
32  : _socket(std::move(socket)), _sslSocket(_socket, SslContext::instance())
33  {
34  _sslSocket.set_verify_mode(boostssl::verify_none);
35  }
boostssl::stream< tcp::socket & > _sslSocket
Definition: SslSocket.h:87
tcp::socket _socket
Definition: SslSocket.h:86

Member Function Documentation

template<class SslContext >
template<typename HandshakeHandlerType >
void SslSocket< SslContext >::async_handshake ( boostssl::stream_base::handshake_type  type,
HandshakeHandlerType &&  handler 
)
inline
81  {
82  _sslSocket.async_handshake(type, std::move(handler));
83  }
boostssl::stream< tcp::socket & > _sslSocket
Definition: SslSocket.h:87
template<class SslContext >
template<typename MutableBufferSequence , typename ReadHandlerType >
void SslSocket< SslContext >::async_read_some ( MutableBufferSequence const buffers,
ReadHandlerType &&  handler 
)
inline
51  {
52  _sslSocket.async_read_some(buffers, std::move(handler));
53  }
boostssl::stream< tcp::socket & > _sslSocket
Definition: SslSocket.h:87
template<class SslContext >
template<typename ConstBufferSequence , typename WriteHandlerType >
void SslSocket< SslContext >::async_write_some ( ConstBufferSequence const buffers,
WriteHandlerType &&  handler 
)
inline
57  {
58  _sslSocket.async_write_some(buffers, std::move(handler));
59  }
boostssl::stream< tcp::socket & > _sslSocket
Definition: SslSocket.h:87
template<class SslContext >
void SslSocket< SslContext >::close ( boost::system::error_code &  error)
inline
39  {
40  _socket.close(error);
41  }
tcp::socket _socket
Definition: SslSocket.h:86
template<class SslContext >
tcp::socket::endpoint_type SslSocket< SslContext >::remote_endpoint ( ) const
inline
74  {
75  return _socket.remote_endpoint();
76  }
tcp::socket _socket
Definition: SslSocket.h:86
template<class SslContext >
template<typename SettableSocketOption >
void SslSocket< SslContext >::set_option ( SettableSocketOption const option,
boost::system::error_code &  error 
)
inline
69  {
70  _socket.set_option(option, error);
71  }
tcp::socket _socket
Definition: SslSocket.h:86
template<class SslContext >
void SslSocket< SslContext >::shutdown ( boost::asio::socket_base::shutdown_type  what,
boost::system::error_code &  shutdownError 
)
inline
44  {
45  _sslSocket.shutdown(shutdownError);
46  _socket.shutdown(what, shutdownError);
47  }
boostssl::stream< tcp::socket & > _sslSocket
Definition: SslSocket.h:87
tcp::socket _socket
Definition: SslSocket.h:86
template<class SslContext >
template<typename ConstBufferSequence >
std::size_t SslSocket< SslContext >::write_some ( ConstBufferSequence const buffers,
boost::system::error_code &  error 
)
inline
63  {
64  return _sslSocket.write_some(buffers, error);
65  }
boostssl::stream< tcp::socket & > _sslSocket
Definition: SslSocket.h:87

Member Data Documentation

template<class SslContext >
tcp::socket SslSocket< SslContext >::_socket
private
template<class SslContext >
boostssl::stream<tcp::socket&> SslSocket< SslContext >::_sslSocket
private

The documentation for this class was generated from the following file: