mirror of
https://gitee.com/drabel/LibQQt.git
synced 2025-01-04 10:18:44 +08:00
30 lines
567 B
C++
Executable File
30 lines
567 B
C++
Executable File
#ifndef QQTSERVER_H
|
|
#define QQTSERVER_H
|
|
|
|
#include <QTcpServer>
|
|
#include "qqtprotocol.h"
|
|
#include "qqtclient.h"
|
|
|
|
class QQTServer : public QTcpServer
|
|
{
|
|
Q_OBJECT
|
|
public:
|
|
explicit QQTServer(QObject *parent = 0);
|
|
~QQTServer();
|
|
|
|
void installProtocol(QQTProtocol* stack);
|
|
void uninstallProtocol(QQTProtocol* stack);
|
|
QQTProtocol* installedProtocol();
|
|
|
|
signals:
|
|
// QTcpServer interface
|
|
protected:
|
|
void incomingConnection(int handle);
|
|
private:
|
|
QQTProtocol* m_protocol;
|
|
};
|
|
|
|
QQTServer *QQTSingleServer(QObject* parent);
|
|
|
|
#endif // QQTSERVER_H
|