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.
[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.
oatpp::async::Action suggestOutputStreamAction Implementation of OutputStream must suggest async actions for I/O results.
oatpp::async::Action suggestInputStreamAction Implementation of InputStream must suggest async actions for I/O results.
void setOutputStreamIOMode Set OutputStream I/O mode.
oatpp::data::stream::IOMode getOutputStreamIOMode Set OutputStream I/O mode.
oatpp::data::stream::Context& getOutputStreamContext Get output stream context.
void setInputStreamIOMode Set InputStream I/O mode.
oatpp::data::stream::IOMode getInputStreamIOMode Get InputStream I/O mode.
oatpp::data::stream::Context& getInputStreamContext Get input stream context.
void close Close all handles.
TLSHandle getTlsHandle Get TLS handle.

Connection::Connection

Constructor.

Connection(const std::shared_ptr<TLSObject>& tlsObject,
           const std::shared_ptr<oatpp::data::stream::IOStream>& stream)

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, v_buff_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, v_buff_size count) override

Connection::suggestOutputStreamAction

Implementation of OutputStream must suggest async actions for I/O results. Suggested Action is used for scheduling coroutines in async::Executor.

oatpp::async::Action suggestOutputStreamAction(data::v_io_size ioResult) override

Connection::suggestInputStreamAction

Implementation of InputStream must suggest async actions for I/O results. Suggested Action is used for scheduling coroutines in async::Executor.

oatpp::async::Action suggestInputStreamAction(data::v_io_size ioResult) override

Connection::setOutputStreamIOMode

Set OutputStream I/O mode.

  • @param ioMode

void setOutputStreamIOMode(oatpp::data::stream::IOMode ioMode) override

Connection::getOutputStreamIOMode

Set OutputStream I/O mode.

  • @return

oatpp::data::stream::IOMode getOutputStreamIOMode() override

Connection::getOutputStreamContext

Get output stream context.

oatpp::data::stream::Context& getOutputStreamContext() override

Connection::setInputStreamIOMode

Set InputStream I/O mode.

  • @param ioMode

void setInputStreamIOMode(oatpp::data::stream::IOMode ioMode) override

Connection::getInputStreamIOMode

Get InputStream I/O mode.

  • @return

oatpp::data::stream::IOMode getInputStreamIOMode() override

Connection::getInputStreamContext

Get input stream context.

oatpp::data::stream::Context& getInputStreamContext() override

Connection::close

Close all handles.

void close()

Connection::getTlsHandle

Get TLS handle.

  • @return - tls*.

TLSHandle getTlsHandle()