API Documentation
Loading...
Searching...
No Matches
WebSocketConnection.h
Go to the documentation of this file.
1#pragma once
2#include "DLLInfo.h"
3#include <NDEVR/Connection.h>
5class QWebSocket;
6namespace NDEVR
7{
9 {
10 Q_OBJECT
11 public:
14 virtual uint04 peek(char*, uint04 size) const override;
15 virtual uint04 rx(char*, uint04 size = Constant<uint04>::Max) override;
16 virtual void tx(const String& command) override;
17 virtual bool open(const ConnectionInfo& request) override;
18 virtual void close() override;
19 virtual bool isOpen() const override;
20 virtual uint04 bytesAvailable() const override;
21 virtual TranslatedString lastError() const override;
22 virtual bool setPort(QWebSocket* tcp_port);
23 virtual bool waitForReadyRead(const TimeSpan& span) override;
24 virtual bool waitForConnection(QWebSocket* socket, const ConnectionInfo& request);
25 void setSocket(QWebSocket* socket);
26 protected slots:
27 void handleSocketErrorSlot(int error);
28 void binaryMessageRecieved(const QByteArray& array);
29 void textMessageRecieved(const QString& message);
30 protected:
31 QWebSocket* m_socket = nullptr;
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_WEB_SOCKET_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 String.h:40
Definition TimeSpan.h:40
Definition TranslatedString.h:9
Definition WebSocketConnection.h:36
virtual Buffer< ConnectionInfo > availableConnections(const ConnectionSearchParamaters &params) override
Definition WebSocketConnection.cpp:258
virtual bool handlesType(const String &request) const override
Definition WebSocketConnection.cpp:243
virtual ConnectionBackend * createConnection(const ConnectionInfo &request) override
Definition WebSocketConnection.cpp:254
virtual Buffer< ConnectionCategory > availableConnectionCatagories() override
Definition WebSocketConnection.cpp:263
Definition WebSocketConnection.h:9
TranslatedString m_last_error
Definition WebSocketConnection.h:32
String m_data
Definition WebSocketConnection.h:33
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
Definition Connection.h:87
Definition Connection.h:120
Definition BaseValues.hpp:272