34#ifdef NDEVR_SUPPORTS_SOCKET_IO
36#include <NDEVR/Connection.h>
44 class SocketIOChannel;
48 SocketIODriver(ProgressInfo* log =
nullptr);
49 SocketIODriver(DynamicPointer<SocketIOChannel> socket, ProgressInfo* log =
nullptr);
50 ~SocketIODriver() =
default;
51 SocketIODriver(
const SocketIODriver& other) =
delete;
52 SocketIODriver(SocketIODriver&& other) =
delete;
53 SocketIODriver& operator=(
const SocketIODriver& other) =
delete;
54 SocketIODriver& operator=(SocketIODriver&& other) =
delete;
56 virtual uint04 peek(
char* s, uint04 size = Constant<uint04>::Max)
const override;
57 virtual uint04 rx(
char* s, uint04 max_size = Constant<uint04>::Max)
override;
58 virtual void tx(
const String& command)
override;
59 virtual bool open(
const ConnectionInfo& request)
override;
60 virtual void close()
override;
61 virtual bool isOpen()
const override;
62 virtual bool waitForReadyRead(
const TimeSpan& span)
override;
63 virtual TranslatedString lastError()
const override;
64 virtual uint04 bytesAvailable()
const override;
66 DynamicPointer<SocketIOChannel> m_socket;
67 QByteArray m_channel_write_buffer;
68 QByteArray m_channel_read_buffer;
69 Dictionary<int, unsigned int> m_received_bytes;
70 std::mutex m_critical_section;
71 bool m_is_open =
false;
74 class SocketIOConnectionFactory :
public ConnectionFactory
77 virtual bool handlesType(
const String& request)
const override;
78 virtual ConnectionBackend* createConnection(
const ConnectionInfo& request)
override;
79 virtual Buffer<ConnectionInfo> availableConnections(
const ConnectionSearchParamaters& params)
override;
80 virtual Buffer<ConnectionCategory> availableConnectionCatagories()
override;
uint32_t uint04
-Defines an alias representing a 4 byte, unsigned integer -Can represent exact integer values 0 throu...
Definition BaseValues.hpp:115