API Documentation
Loading...
Searching...
No Matches
SocketConnection.h
Go to the documentation of this file.
1#pragma once
2#include "DLLInfo.h"
3#include <NDEVR/Connection.h>
5namespace NDEVR
6{
8 {
9 public:
12 virtual uint04 peek(char*, uint04 size) const final override;
13 virtual uint04 rx(char*, uint04 size = Constant<uint04>::Max) final override;
14 virtual void tx(const String& command) final override;
15 virtual bool open(const ConnectionInfo& request) final override;
16 virtual void close() final override;
17 virtual bool isOpen() const final override;
18 virtual uint04 bytesAvailable() const override;
19 virtual TranslatedString lastError() const final override;
20 virtual bool setTCPPort(QTcpSocket* tcp_port, ConnectionOpenType connect_mode);
21 virtual bool setUDPPort(QUdpSocket* udp_port, ConnectionOpenType connect_mode);
22 virtual bool waitForReadyRead(const TimeSpan& span) final override;
23 virtual bool waitForConnection(QAbstractSocket* socket, const ConnectionInfo& request);
24 void setSocket(QAbstractSocket* socket);
25 bool openUDP(const ConnectionInfo& request);
26 bool openUDPServer(const ConnectionInfo& request);
27 bool openTCP(const ConnectionInfo& request);
28 protected slots:
29 void handleSocketErrorSlot(int error);
30 protected:
31 QAbstractSocket* m_socket = nullptr;
33 uint02 m_broadcast_port = Constant<uint02>::NaN;
34 };
36 {
37 public:
38 virtual bool handlesType(const String& request) const override;
39 virtual ConnectionBackend* createConnection(const ConnectionInfo& request) override;
42 };
43}
#define NDEVR_NETWORK_PROTOCOLS_API
Definition DLLInfo.h:73
The equivelent of std::vector but with a bit more control. The basic array unit of the library.
Definition Buffer.hpp:64
Definition Connection.h:134
Definition Connection.h:155
Definition ProgressInfo.hpp:43
Definition SocketConnection.h:36
virtual Buffer< ConnectionInfo > availableConnections(const ConnectionSearchParamaters &params) override
Definition SocketConnection.cpp:395
virtual bool handlesType(const String &request) const override
Definition SocketConnection.cpp:379
virtual ConnectionBackend * createConnection(const ConnectionInfo &request) override
Definition SocketConnection.cpp:391
virtual Buffer< ConnectionCategory > availableConnectionCatagories() override
Definition SocketConnection.cpp:400
Definition SocketConnection.h:8
TranslatedString m_last_error
Definition SocketConnection.h:32
Definition String.h:40
Definition TimeSpan.h:40
Definition TranslatedString.h:9
Definition ACIColor.h:37
uint32_t uint04
-Defines an alias representing a 4 byte, unsigned integer -Can represent exact integer values 0 throu...
Definition BaseValues.hpp:120
uint16_t uint02
-Defines an alias representing a 2 byte, unsigned integer -Can represent exact integer values 0 throu...
Definition BaseValues.hpp:109
ConnectionOpenType
Definition Connection.h:69
Definition Connection.h:87
Definition Connection.h:120
Definition BaseValues.hpp:272