You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

test.h 488B

1234567891011121314151617181920212223242526272829303132
  1. #ifndef TEST_H
  2. #define TEST_H
  3. #include <QObject>
  4. #include "ptserver.h"
  5. #include "ptsocket.h"
  6. #include <QDebug>
  7. #define ASSERT_LISTEN Q_ASSERT(m_serv->isListening())
  8. class Test : public QObject
  9. {
  10. Q_OBJECT
  11. public:
  12. explicit Test(QObject *parent = 0);
  13. signals:
  14. public slots:
  15. void testListen(quint16 p);
  16. void testNewConnection();
  17. private slots:
  18. void m_newConnection();
  19. void m_newClient(PTSocket* s);
  20. private:
  21. PTServer* m_serv;
  22. QList<PTSocket*> m_clients;
  23. };
  24. #endif // TEST_H