Connection.hpp

This File On Github
Ask A Question

API: latest
module: oatpp-libressl
#include "oatpp-libressl/Connection.hpp"

Connection

TLS Connection implementation. Extends oatpp::base::Countable and oatpp::data::stream::IOStream.

namespace oatpp { namespace libressl { 
  class Connection : public oatpp::base::Countable, public oatpp::data::stream::IOStream {}
}}

Methods

Return Type Name Summary
[none] Connection Constructor.
std::shared_ptr<Connection> createShared Create shared connection.
[none] ~Connection Virtual destructor.
data::v_io_size write Implementation of oatpp::data::stream::OutputStream::write() method.
data::v_io_size read Implementation of oatpp::data::stream::InputStream::read() method.
void close Close all handles.
TLSHandle getTlsHandle Get TLS handle.
data::v_io_handle getHandle Get socket handle.

Connection::Connection

Constructor.

Connection(TLSHandle tlsHandle, data::v_io_handle handle)

Connection::createShared

Create shared connection.

  • @param tlsHandle - tls*.
  • @param handle - connection handle (file descriptor). oatpp::data::v_io_handle.
  • @return - std::shared_ptr to Connection.

static std::shared_ptr<Connection> createShared(TLSHandle tlsHandle, data::v_io_handle handle)

Connection::~Connection

Virtual destructor.

~Connection()

Connection::write

Implementation of oatpp::data::stream::OutputStream::write() method.

  • @param buff - data to write to stream.
  • @param count - data size.
  • @return - actual amount of bytes written.

data::v_io_size write(const void *buff, data::v_io_size count) override

Connection::read

Implementation of oatpp::data::stream::InputStream::read() method.

  • @param buff - buffer to read data to.
  • @param count - buffer size.
  • @return - actual amount of bytes read.

data::v_io_size read(void *buff, data::v_io_size count) override

Connection::close

Close all handles.

void close()

Connection::getTlsHandle

Get TLS handle.

  • @return - tls*.

TLSHandle getTlsHandle()

Connection::getHandle

Get socket handle.

data::v_io_handle getHandle()