gloox  1.0.20
Public Member Functions | List of all members
ConnectionTLSServer Class Reference

#include <connectiontlsserver.h>

Inheritance diagram for ConnectionTLSServer:
Inheritance graph
[legend]

Public Member Functions

 ConnectionTLSServer (ConnectionDataHandler *cdh, ConnectionBase *conn, const LogSink &log)
 
 ConnectionTLSServer (ConnectionBase *conn, const LogSink &log)
 
virtual ~ConnectionTLSServer ()
 
virtual TLSBasegetTLSBase (TLSHandler *th, const std::string server)
 
virtual ConnectionBasenewInstance () const
 
- Public Member Functions inherited from ConnectionTLS
 ConnectionTLS (ConnectionDataHandler *cdh, ConnectionBase *conn, const LogSink &log)
 
 ConnectionTLS (ConnectionBase *conn, const LogSink &log)
 
virtual ~ConnectionTLS ()
 
void setCACerts (const StringList &cacerts)
 
const CertInfofetchTLSInfo () const
 
void setClientCert (const std::string &clientKey, const std::string &clientCerts)
 
void setConnectionImpl (ConnectionBase *connection)
 
void registerTLSHandler (TLSHandler *th)
 
virtual ConnectionError connect ()
 
virtual ConnectionError recv (int timeout=-1)
 
virtual bool send (const std::string &data)
 
virtual ConnectionError receive ()
 
virtual void disconnect ()
 
virtual void cleanup ()
 
virtual void getStatistics (long int &totalIn, long int &totalOut)
 
virtual void handleReceivedData (const ConnectionBase *connection, const std::string &data)
 
virtual void handleConnect (const ConnectionBase *connection)
 
virtual void handleDisconnect (const ConnectionBase *connection, ConnectionError reason)
 
virtual void handleEncryptedData (const TLSBase *, const std::string &data)
 
virtual void handleDecryptedData (const TLSBase *, const std::string &data)
 
virtual void handleHandshakeResult (const TLSBase *base, bool success, CertInfo &certinfo)
 
- Public Member Functions inherited from TLSHandler
virtual ~TLSHandler ()
 
- Public Member Functions inherited from ConnectionBase
 ConnectionBase (ConnectionDataHandler *cdh)
 
virtual ~ConnectionBase ()
 
ConnectionState state () const
 
void registerConnectionDataHandler (ConnectionDataHandler *cdh)
 
void setServer (const std::string &server, int port=-1)
 
const std::string & server () const
 
int port () const
 
virtual int localPort () const
 
virtual const std::string localInterface () const
 
- Public Member Functions inherited from ConnectionDataHandler
virtual ~ConnectionDataHandler ()
 

Additional Inherited Members

- Protected Attributes inherited from ConnectionBase
ConnectionDataHandlerm_handler
 
ConnectionState m_state
 
std::string m_server
 
int m_port
 

Detailed Description

This is an implementation of the server-side of a TLS/SSL connection.

You should not need to use this class directly.

Author
Jakob Schröter js@ca.nosp@m.maya.nosp@m..net
Since
1.0

Definition at line 38 of file connectiontlsserver.h.

Constructor & Destructor Documentation

◆ ConnectionTLSServer() [1/2]

ConnectionTLSServer ( ConnectionDataHandler cdh,
ConnectionBase conn,
const LogSink log 
)

Constructs a new ConnectionTLSServer object.

Parameters
cdhThe ConnectionDataHandler that will be notified of events from this connection
connA transport connection. It should be an established connection from a client that is about to perform a TLS handshake. ConnectionTLSServer will own the transport connection and delete it in its destructor.
logThe log target. Obtain it from ClientBase::logInstance().

Definition at line 18 of file connectiontlsserver.cpp.

◆ ConnectionTLSServer() [2/2]

ConnectionTLSServer ( ConnectionBase conn,
const LogSink log 
)

Constructs a new ConnectionTLSServer object.

Parameters
connA transport connection. It should be an established connection from a client that is about to perform a TLS handshake. ConnectionTLSServer will own the transport connection and delete it in its destructor.
logThe log target. Obtain it from ClientBase::logInstance().

Definition at line 24 of file connectiontlsserver.cpp.

◆ ~ConnectionTLSServer()

~ConnectionTLSServer ( )
virtual

Virtual Destructor.

Definition at line 29 of file connectiontlsserver.cpp.

Member Function Documentation

◆ getTLSBase()

TLSBase * getTLSBase ( TLSHandler th,
const std::string  server 
)
virtual

Returns a TLS server.

Returns
A TLS server.

Reimplemented from ConnectionTLS.

Definition at line 33 of file connectiontlsserver.cpp.

◆ newInstance()

ConnectionBase * newInstance ( ) const
virtual

This function returns a new instance of the current ConnectionBase-derived object. The idea is to be able to 'clone' ConnectionBase-derived objects without knowing of what type they are exactly.

Returns
A new Connection* instance.

Reimplemented from ConnectionTLS.

Definition at line 38 of file connectiontlsserver.cpp.


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