2#include <NDEVR/NDEVRCommunicationLogic.h>
3#include <NDEVR/String.h>
4#include <NDEVR/QueueBuffer.h>
33 virtual uint08 rx(
void* socket, NDEVRDataPacket& packet)
override;
40 virtual uint08 tx(
void* socket, NDEVRDataPacket& packet,
uint08 size)
override;
59 virtual bool isOpen(
void* socket =
nullptr)
const override;
68 void onBytesWritten(qint64);
72 void onReconnectTimeout();
QTimer reconnectTimer
Timer for automatic reconnection attempts.
QTimer m_send_timer
Timer for periodic send buffer flushing.
virtual void disconnectFrom(void *socket) override
Disconnects from the specified socket.
virtual void wait(const TimeSpan &span, LogPtr log=nullptr) override
Waits for the specified time span, processing events.
AdaptiveTCPClient(QObject *parent=nullptr)
Constructs the TCP client.
void connectToServer(const StringView &host, uint04 port)
Initiates a TCP connection to the specified host and port.
virtual bool isOpen(void *socket=nullptr) const override
Checks whether the socket is currently connected.
virtual uint08 rx(void *socket, NDEVRDataPacket &packet) override
Receives data from the socket into a packet.
QTcpSocket * m_server_socket
The underlying TCP socket.
virtual uint08 tx(void *socket, NDEVRDataPacket &packet, uint08 size) override
Transmits packet data through the socket.
void * connectTo(const NDEVRServerInfo &server) override
Establishes a connection to the specified server.
A light-weight wrapper that will be a no-op if there is not a valid log reference,...
The core String View class for the NDEVR API.
Stores a time span, or difference between two times, with an optional start time.
The primary namespace for the NDEVR SDK.
uint64_t uint08
-Defines an alias representing an 8 byte, unsigned integer
uint32_t uint04
-Defines an alias representing a 4 byte, unsigned integer -Can represent exact integer values 0 throu...
Contains the address, credentials, and security flag needed to connect to an NDEVR server.