30 lines
547 B
C++
Executable File
30 lines
547 B
C++
Executable File
/**
|
|
* Small test program to connect to the wls websocket
|
|
* $Id$
|
|
* $HeadURL$
|
|
* $Author$
|
|
* Created by Christian Ehrlicher, SLSE, 2017-01-10
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
#include <QObject>
|
|
#include <QWebSocket>
|
|
|
|
class WlsJsonclientTest : public QObject
|
|
{
|
|
Q_OBJECT
|
|
public:
|
|
WlsJsonclientTest(const QString &hostname, unsigned short port);
|
|
|
|
protected Q_SLOTS:
|
|
void run();
|
|
void onConnected();
|
|
void onClosed();
|
|
void onTextMessageReceived(const QString &msg);
|
|
private:
|
|
QWebSocket *m_socket;
|
|
QString m_hostname;
|
|
unsigned short m_port;
|
|
};
|