summaryrefslogtreecommitdiff
path: root/distfoldd/server.h
blob: 0ed9100dc173d6da40ba7cd82133cec657b4ec2b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#ifndef SERVER_H
#define SERVER_H

#include <QtNetwork/QTcpServer>
#include <QtNetwork/QSslCertificate>
#include <QtNetwork/QSslKey>

class Server : public QTcpServer
{
	Q_OBJECT
public:
	explicit Server(QObject *parent = 0);

protected:
	void loadKeys();
	void incomingConnection(int handle);

private slots:
	void handleSocketError(QAbstractSocket::SocketError error);

private:
	QSslCertificate _cert;
	QSslKey _key;
};

#endif // SERVER_H