12#ifndef OPENVPN_TUN_PERSIST_TUNWRAP_H
13#define OPENVPN_TUN_PERSIST_TUNWRAP_H
42template <
typename SCOPED_OBJ>
60 return obj_.defined();
64 typename SCOPED_OBJ::base_type
obj()
const
88 std::ostringstream os;
94 catch (
const std::exception &e)
96 OPENVPN_LOG(
"TunWrap destructor exception: " << e.what());
void reset() noexcept
Points this RCPtr<T> to nullptr safely.
Reference count base class for objects tracked by RCPtr. Disallows copying and assignment.
bool destructor_defined() const
RCPtr< TunWrapTemplate > Ptr
void save_replace_sock(const typename SCOPED_OBJ::base_type obj)
void add_destructor(const DestructorBase::Ptr &destruct)
TunWrapTemplate(const TunWrapObjRetain retain_obj)
const TunWrapObjRetain retain_obj_
DestructorBase::Ptr destruct_
virtual ~TunWrapTemplate()
SCOPED_OBJ::base_type obj() const
#define OPENVPN_LOG(args)
#define OPENVPN_LOG_STRING(str)
Support deferred server-side state creation when client connects.
virtual void destroy(std::ostream &os)=0