XX CMake Package
Loading...
Searching...
No Matches
XXSecureNetworkServer.h
Go to the documentation of this file.
1#ifndef XXSecureNetworkServerH
2#define XXSecureNetworkServerH
3
5#include <QObject>
6
7#include <QSslConfiguration>
8
10
11namespace XX
12{
13 namespace SecureNetwork
14 {
15 class Socket;
16 class ServerInternal;
17
20
21 class XXNETWORK_DECLSPEC Server : public QObject
22 {
23 Q_OBJECT
24 public:
25 Server(QObject* parent);
27
28 signals:
30
31 public:
32 void listen(const quint16& port);
33 bool setEncryption(const QString& caCertFileName, const QString& serverCertFileName, const QString& serverKeyFileName);
34 void setConfiguration(const QSslConfiguration& newSslConfiguration);
35 bool setPeerCommmonNameList(const QString& authUserFileName);
36 const QList<Socket::Pointer>& getSocketList() const;
37 void removeSocket(Socket* socket);
38 const QSslConfiguration& getConfiguration() const;
39
40 private:
41 friend class ServerInternal;
42
43 private:
44 void newConnection(Socket* socket);
45
46 private:
47 ServerInternal* internal;
48 QSslConfiguration sslConfiguration;
49 QList<Socket::Pointer> socketList;
50 QString issuerName;
51 QStringList peerCommonNameList;
52 };
53 } // namespace SecureNetwork
54} // namespace XX
55
56#endif // NOT XXSecureNetworkServerH
#define XXNETWORK_DECLSPEC
Definition XXNetworkExportDef.h:11
const QSslConfiguration & getConfiguration() const
void signalNewEncryptedConnection(Socket *socket)
bool setEncryption(const QString &caCertFileName, const QString &serverCertFileName, const QString &serverKeyFileName)
bool setPeerCommmonNameList(const QString &authUserFileName)
Server(QObject *parent)
const QList< Socket::Pointer > & getSocketList() const
void setConfiguration(const QSslConfiguration &newSslConfiguration)
void listen(const quint16 &port)
void removeSocket(Socket *socket)
friend class ServerInternal
Definition XXSecureNetworkServer.h:41
Definition XXSecureNetworkServerInternal.h:16
secure network socket
Definition XXSecureNetworkSocket.h:20
Definition XXSecureNetworkServerInternal.h:11
Definition XXPopulatedAbstract.h:11