PdCom  5.3
Process data communication client
Loading...
Searching...
No Matches
PdCom::SecureProcess Class Reference
Inheritance diagram for PdCom::SecureProcess:
PdCom::Process

Classes

struct  EncryptionDetails
 

Public Member Functions

 SecureProcess (EncryptionDetails const &)
 
void asyncData ()
 calls Process::asyncData() until gnutls' buffers are empty.
 
bool handshake ()
 TLS Handshake.
 
void bye ()
 Close a TLS session.
 
- Public Member Functions inherited from PdCom::Process
 Process ()
 Constructor.
 
 Process (Process &&)=delete
 
 Process (Process const &)=delete
 
Processoperator= (Process &&)=delete
 
Processoperator= (Process const &)=delete
 
std::string name () const
 Remote process name string.
 
std::string version () const
 Remote process version string.
 
void asyncData ()
 Library entry point for new data.
 
void callPendingCallbacks ()
 Call delayed callbacks.
 
void broadcast (const std::string &message, const std::string &attr="text")
 Send a broadcast message to the server and other clients.
 
std::vector< SubscriptionInfogetActiveSubscriptions () const
 

Static Public Member Functions

static void InitLibrary ()
 GnuTls global initialization.
 
static void FinalizeLibrary ()
 GnuTls global finalization.
 

Additional Inherited Members

- Protected Member Functions inherited from PdCom::Process
virtual ~Process ()
 Destructor.
 
void reset ()
 Reset communications and clean up internal buffers.
 
virtual std::string applicationName () const
 Name of application user application.
 
virtual std::string hostname () const
 Host name of remote server.
 
virtual int read (char *buf, int count)=0
 Read data from server.
 
virtual void write (const char *buf, size_t count)=0
 Write data to server.
 
virtual void connected ()=0
 Protocol initialization completed.
 
bool list (const std::string &path="")
 List a directory path.
 
virtual void listReply (std::vector< Variable > variables, std::vector< std::string > dirs)
 Reply to list() call.
 
bool find (const std::string &path)
 Find a variable with a corresponding path.
 
virtual void findReply (const Variable &variable)
 Reply to find()
 
void getClientStatistics ()
 Request client statistics from the server.
 
virtual void clientStatisticsReply (std::vector< ClientStatistics > statistics)
 Reply for getClientStatistics().
 
void ping ()
 Ping server.
 
virtual void pingReply ()
 Ping reply.
 
virtual bool alive ()
 Test from process whether client is alive.
 
void setAuthManager (Sasl *)
 Register a SASL handler.
 
SaslgetAuthManager () const
 Get the current SASL handler.
 
void setMessageManager (MessageManagerBase *)
 Register a Message handler.
 
virtual void broadcastReply (const std::string &message, const std::string &attr, std::chrono::nanoseconds time_ns, const std::string &user)
 Recieve a broadcast message from other clients.
 

Detailed Description

Member Function Documentation

◆ handshake()

bool PdCom::SecureProcess::handshake ( )

TLS Handshake.

Start a TLS Session with the server. Call this until it returns true.

Returns
True if successful, false if another call is needed.
Exceptions
TlsErrorFatal Error occured.
Examples
gnutls_example.cpp.

◆ InitLibrary()

static void PdCom::SecureProcess::InitLibrary ( )
static

GnuTls global initialization.

Call this at startup of your application to prepare the underlying TLS library.

Exceptions
PdCom::ExceptionInitialization failed.
Examples
gnutls_example.cpp.

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