A RealTimeSource
which reads from a TCP socket.
More...
#include <realtimetcpconnection.h>
A RealTimeSource
which reads from a TCP socket.
virtual bool RealTimeTcpConnection::isConnected |
( |
| ) |
const |
|
overridevirtual |
virtual QString RealTimeTcpConnection::name |
( |
| ) |
const |
|
overridevirtual |
The TCP address being used.
- Returns
- The TCP connection name.
Implements RealTimeConnection.
bool RealTimeTcpConnection::open |
( |
const QHostAddress & |
address, |
|
|
quint16 |
port, |
|
|
uint |
timeout = 5000 |
|
) |
| |
Open a TCP connection to the indicated address and port.
Closes the existing connection as required.
This function may block for up to the specified timeout
, attempting to establish a connection. After this time has elapsed, the connection is deemed to have failed.
- Parameters
-
address | The target address. |
port | The connection port. |
timeout | The connection wait timeout (millisecond). |
- Returns
- True if the connection is successfully established.
int RealTimeTcpConnection::read |
( |
QByteArray & |
buffer | ) |
|
|
overridevirtual |
Read data into the given buffer.
- Parameters
-
buffer | The buffer to read into. |
Implements RealTimeConnection.
int RealTimeTcpConnection::send |
( |
const QByteArray & |
buffer | ) |
|
|
overridevirtual |
Send the given buffer to the source.
- Parameters
-
buffer | The buffer to send. |
Implements RealTimeConnection.
The documentation for this class was generated from the following file: