6 #ifndef REALTIMEUDPCONNECTION_H_
7 #define REALTIMEUDPCONNECTION_H_
9 #include "ocurvesconfig.h"
11 #include "realtimeconnection.h"
13 #include <QHostAddress>
31 virtual QString
name()
const override;
43 bool open(
const QHostAddress &address, quint16 port);
54 int send(
const QByteArray &buffer)
override;
58 int read(QByteArray &buffer)
override;
62 QHostAddress _address;
66 #endif // REALTIMEUDPCONNECTION_H_
~RealTimeUdpConnection()
Destructor, ensures disconnect() is called.
int read(QByteArray &buffer) override
Read data into the given buffer.
bool open(const QHostAddress &address, quint16 port)
Open a UDP connection to the indicated address and port.
virtual QString name() const override
The UDP address being used.
virtual bool isConnected() const override
Is the port open for communication?
RealTimeUdpConnection()
Create an unconnected UDP connection.
This is the base class for data source which provides data in real time.
Definition: realtimeconnection.h:16
virtual void disconnect() override
Disconnect if connected.
int send(const QByteArray &buffer) override
Send the given buffer to the source.
A RealTimeSource which reads from a UDP socket.
Definition: realtimeudpconnection.h:20