Enigma  3.2.0
A Simple, Reliable and Efficient Encryption Tool
SingleProcessInstance Class Reference

Single process instance class. More...

#include <SingleProcessInstance.hpp>

Inheritance diagram for SingleProcessInstance:
Application

Public Member Functions

 SingleProcessInstance (const std::uint16_t port) noexcept
 
bool IsUnique () const noexcept
 
virtual ~SingleProcessInstance () noexcept
 

Detailed Description

Single process instance class.

if your application inherrits from this class, it will have only one instance at a time. Using a socket implementation, this checks to see if the application is already open or not. You must also choose a port that is unique to the application.

Definition at line 35 of file SingleProcessInstance.hpp.

Constructor & Destructor Documentation

◆ SingleProcessInstance()

SingleProcessInstance::SingleProcessInstance ( const std::uint16_t  port)
inlineexplicitnoexcept

Single process instance class constructor

Parameters
portApplication's unique port

Definition at line 40 of file SingleProcessInstance.hpp.

◆ ~SingleProcessInstance()

virtual SingleProcessInstance::~SingleProcessInstance ( )
inlinevirtualnoexcept

Single process instace destructor Closes the socket and shuts down WinSock on windows

Definition at line 100 of file SingleProcessInstance.hpp.

Member Function Documentation

◆ IsUnique()

bool SingleProcessInstance::IsUnique ( ) const
inlinenoexcept

Returns true if this is a unique process instance (no other instance of this process is running)

Definition at line 93 of file SingleProcessInstance.hpp.


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