mirror of
https://github.com/jankae/LibreVNA.git
synced 2025-12-06 07:12:10 +01:00
28 lines
538 B
C++
28 lines
538 B
C++
#ifndef STREAMINGSERVER_H
|
|
#define STREAMINGSERVER_H
|
|
|
|
#include <QTcpServer>
|
|
#include <QTcpSocket>
|
|
#include <set>
|
|
|
|
#include "Device/devicedriver.h"
|
|
|
|
class StreamingServer : public QObject
|
|
{
|
|
Q_OBJECT
|
|
public:
|
|
StreamingServer(int port);
|
|
|
|
void addData(const DeviceDriver::VNAMeasurement &m, bool is_zerospan);
|
|
void addData(const DeviceDriver::SAMeasurement &m, bool is_zerospan);
|
|
|
|
int getPort() {return port;}
|
|
|
|
private:
|
|
int port;
|
|
QTcpServer server;
|
|
std::set<QTcpSocket*> sockets;
|
|
};
|
|
|
|
#endif // STREAMINGSERVER_H
|