Adds initial intermediate qt6 porting state
This commit is contained in:
11247 files changed
+1891537
No files matched your search
+40
@@ -0,0 +1,40 @@
|
||||
|
||||
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <QTcpServer>
|
||||
|
||||
class QTimer;
|
||||
class PayloadSender : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
PayloadSender(int numByte, int ctrFail, QTcpSocket *s, QObject *parent = nullptr);
|
||||
~PayloadSender();
|
||||
|
||||
private Q_SLOTS:
|
||||
void onTimeout();
|
||||
private:
|
||||
QTcpSocket *m_socket;
|
||||
QTimer *m_timer;
|
||||
char m_char;
|
||||
int m_numByte;
|
||||
int m_ctrFail;
|
||||
};
|
||||
|
||||
class TcpTestServer : public QTcpServer
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
TcpTestServer(int numByte, int ctrFail, QObject *parent = nullptr);
|
||||
~TcpTestServer();
|
||||
|
||||
private Q_SLOTS:
|
||||
void onNewIncomingConnection();
|
||||
void onPayloadSenderDestroyed(QObject *obj);
|
||||
private:
|
||||
QSet<QObject *> m_openConnections;
|
||||
int m_numByte;
|
||||
int m_ctrFail;
|
||||
};
|
||||
Reference in new issue
Block a user