# TLSObject.hpp

This File On Github
Ask A Question

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

# TLSObject

Utility object. Used to manage TLS handle TLSObject::TLSHandle.

namespace oatpp { namespace libressl { 
  class TLSObject {}
}}

# Methods

Return Type Name Summary
[none] TLSObject Constructor.
[none] ~TLSObject Non-virtual destructor.
TLSHandle getTLSHandle Get underlying TLS handle.
Type getType Get type of TLSObject.
oatpp::String getServerName Get server name - applicable if TLSObject::Type == SERVER.
void annul Forget about TLS handle. TLS handle won't be freed on the destruction of TLS Object.
void close Call tls_close and tls_free on the underlying TLS handle.
bool isClosed Check if TLS object was closed.

# TLSObject::TLSObject

Constructor.

  • @param tlsHandle
  • @param type
  • @param serverName

TLSObject(TLSHandle tlsHandle, Type type, const oatpp::String& serverName)

# TLSObject::~TLSObject

Non-virtual destructor. Calls TLSObject::close().

~TLSObject()

# TLSObject::getTLSHandle

Get underlying TLS handle.

  • @return

TLSHandle getTLSHandle()

# TLSObject::getType

Get type of TLSObject.

  • @return

Type getType()

# TLSObject::getServerName

Get server name - applicable if TLSObject::Type == SERVER.

  • @return

oatpp::String getServerName()

# TLSObject::annul

Forget about TLS handle. TLS handle won't be freed on the destruction of TLS Object.

void annul()

# TLSObject::close

Call tls_close and tls_free on the underlying TLS handle.

void close()

# TLSObject::isClosed

Check if TLS object was closed.

  • @return

bool isClosed()

# TLSObject::Type

TLSHandle type.

namespace oatpp { namespace libressl { 
  class TLSObject {}
}}

# TLSObject::tls

Convenience typedef for struct tls*.

namespace oatpp { namespace libressl { 
  class TLSObject {
    typedef struct tls* TLSHandle {}
  };
}}