Apache Mesos
Public Member Functions | Static Public Member Functions | Protected Member Functions | List of all members
process::network::internal::OpenSSLSocketImpl Class Reference

#include <openssl_socket.hpp>

Inheritance diagram for process::network::internal::OpenSSLSocketImpl:
process::network::internal::PollSocketImpl process::network::internal::SocketImpl

Public Member Functions

 OpenSSLSocketImpl (int_fd _s)
 
 ~OpenSSLSocketImpl () override
 
Future< Nothingconnect (const Address &address) override
 
Future< Nothingconnect (const Address &address, const openssl::TLSClientConfig &config) override
 
Future< size_t > recv (char *data, size_t size) override
 
Future< size_t > send (const char *data, size_t size) override
 
Future< size_t > sendfile (int_fd fd, off_t offset, size_t size) override
 
Future< std::shared_ptr< SocketImpl > > accept () override
 Returns an implementation corresponding to the next pending connection for the listening socket. More...
 
SocketImpl::Kind kind () const override
 
Try< Nothing, SocketErrorshutdown (int how) override
 Shuts down the socket. More...
 
- Public Member Functions inherited from process::network::internal::PollSocketImpl
 PollSocketImpl (int_fd s)
 
 ~PollSocketImpl () override
 
Try< Nothinglisten (int backlog) override
 
- Public Member Functions inherited from process::network::internal::SocketImpl
virtual ~SocketImpl ()
 
int_fd get () const
 Returns the file descriptor wrapped by this implementation. More...
 
Try< Addressaddress () const
 Returns the Address with the assigned ip and assigned port. More...
 
Try< Addresspeer () const
 Returns the peer's Address for the accepted or connected socket. More...
 
Try< Addressbind (const Address &address)
 Assigns the specified address to the socket. More...
 
virtual Future< std::string > recv (const Option< ssize_t > &size=None())
 An overload of recv, which receives data based on the specified 'size' parameter. More...
 
virtual Future< Nothingsend (const std::string &data)
 An overload of send, which sends all of the specified data. More...
 

Static Public Member Functions

static Try< std::shared_ptr< SocketImpl > > create (int_fd s)
 
- Static Public Member Functions inherited from process::network::internal::PollSocketImpl
static Try< std::shared_ptr< SocketImpl > > create (int_fd s)
 
- Static Public Member Functions inherited from process::network::internal::SocketImpl
static Kind DEFAULT_KIND ()
 Returns the default Kind of implementation. More...
 
static Try< std::shared_ptr< SocketImpl > > create (int_fd s, Kind kind=DEFAULT_KIND())
 Returns an instance of a SocketImpl using the specified kind of implementation. More...
 
static Try< std::shared_ptr< SocketImpl > > create (Address::Family family, Kind kind=DEFAULT_KIND())
 Returns an instance of a SocketImpl using the specified kind of implementation. More...
 

Protected Member Functions

void handle_accept_callback (const std::shared_ptr< SocketImpl > &socket)
 
Future< size_t > set_ssl_and_do_handshake (SSL *_ssl)
 
Future< ControlFlow< size_t > > handle_ssl_return_result (int result, bool handle_as_read)
 
- Protected Member Functions inherited from process::network::internal::SocketImpl
 SocketImpl (int_fd _s)
 
int_fd release ()
 Releases ownership of the file descriptor. More...
 

Additional Inherited Members

- Public Types inherited from process::network::internal::SocketImpl
enum  Kind { Kind::POLL }
 Available kinds of implementations. More...
 
- Static Protected Member Functions inherited from process::network::internal::SocketImpl
template<typename T >
static std::shared_ptr< T > shared (T *t)
 Returns a std::shared_ptr<T> from this implementation. More...
 
- Protected Attributes inherited from process::network::internal::SocketImpl
int_fd s
 

Constructor & Destructor Documentation

process::network::internal::OpenSSLSocketImpl::OpenSSLSocketImpl ( int_fd  _s)
process::network::internal::OpenSSLSocketImpl::~OpenSSLSocketImpl ( )
override

Member Function Documentation

Future<std::shared_ptr<SocketImpl> > process::network::internal::OpenSSLSocketImpl::accept ( )
overridevirtual

Returns an implementation corresponding to the next pending connection for the listening socket.

All implementations will set the NONBLOCK and CLOEXEC options on the returned socket.

TODO(josephw): MESOS-5729: Consider making the CLOEXEC option configurable by the caller of the interface.

Reimplemented from process::network::internal::PollSocketImpl.

Future<Nothing> process::network::internal::OpenSSLSocketImpl::connect ( const Address address)
overridevirtual
Future<Nothing> process::network::internal::OpenSSLSocketImpl::connect ( const Address address,
const openssl::TLSClientConfig &  config 
)
override
static Try<std::shared_ptr<SocketImpl> > process::network::internal::OpenSSLSocketImpl::create ( int_fd  s)
static
void process::network::internal::OpenSSLSocketImpl::handle_accept_callback ( const std::shared_ptr< SocketImpl > &  socket)
protected
Future<ControlFlow<size_t> > process::network::internal::OpenSSLSocketImpl::handle_ssl_return_result ( int  result,
bool  handle_as_read 
)
protected
SocketImpl::Kind process::network::internal::OpenSSLSocketImpl::kind ( ) const
inlineoverridevirtual
Future<size_t> process::network::internal::OpenSSLSocketImpl::recv ( char *  data,
size_t  size 
)
overridevirtual
Future<size_t> process::network::internal::OpenSSLSocketImpl::send ( const char *  data,
size_t  size 
)
overridevirtual
Future<size_t> process::network::internal::OpenSSLSocketImpl::sendfile ( int_fd  fd,
off_t  offset,
size_t  size 
)
overridevirtual
Future<size_t> process::network::internal::OpenSSLSocketImpl::set_ssl_and_do_handshake ( SSL *  _ssl)
protected
Try<Nothing, SocketError> process::network::internal::OpenSSLSocketImpl::shutdown ( int  how)
overridevirtual

Shuts down the socket.

Accepts an integer which specifies the shutdown mode.

Reimplemented from process::network::internal::SocketImpl.


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