12345678910111213141516171819202122232425262728293031323334 |
- #ifndef TEST_H
- #define TEST_H
-
- #include <QObject>
- #include "ptserver.h"
- #include "ptsocket.h"
- #include <QDebug>
-
- #define ASSERT_LISTEN Q_ASSERT(m_serv->isListening())
-
- class Test : public QObject
- {
- Q_OBJECT
- public:
- explicit Test(QObject *parent = 0);
-
- signals:
-
- public slots:
- void testIntConvert();
- void testListen(quint16 p);
- void testNewConnection();
-
- private slots:
- void m_newConnection();
- void m_newClient(PTSocket* s);
- void m_clientStateChanged(PTSocket::State s);
-
- private:
- PTServer* m_serv;
- QList<PTSocket*> m_clients;
- };
-
- #endif // TEST_H
|