API Documentation
Loading...
Searching...
No Matches
WebSocketConnection Class Reference

#include <WebSocketConnection.h>

Inheritance diagram for WebSocketConnection:
[legend]
Collaboration diagram for WebSocketConnection:
[legend]

Public Member Functions

 WebSocketConnection (ProgressInfo *log)
 
 ~WebSocketConnection ()
 
virtual uint04 peek (char *, uint04 size) const override
 
virtual uint04 rx (char *, uint04 size=Constant< uint04 >::Max) override
 
virtual void tx (const String &command) override
 
virtual bool open (const ConnectionInfo &request) override
 
virtual void close () override
 
virtual bool isOpen () const override
 
virtual uint04 bytesAvailable () const override
 
virtual TranslatedString lastError () const override
 
virtual bool setPort (QWebSocket *tcp_port)
 
virtual bool waitForReadyRead (const TimeSpan &span) override
 
virtual bool waitForConnection (QWebSocket *socket, const ConnectionInfo &request)
 
void setSocket (QWebSocket *socket)
 
- Public Member Functions inherited from ConnectionBackend
 ConnectionBackend (ProgressInfo *log)
 
virtual String threadID () const
 

Protected Slots

void handleSocketErrorSlot (int error)
 
void binaryMessageRecieved (const QByteArray &array)
 
void textMessageRecieved (const QString &message)
 

Protected Attributes

QWebSocket * m_socket = nullptr
 
TranslatedString m_last_error
 
String m_data
 
- Protected Attributes inherited from ConnectionBackend
ProgressInfom_log
 

Additional Inherited Members

- Signals inherited from ConnectionBackend
void dataAvailableSignal ()
 
void connectionStateChangedSignal (ConnectionState state)
 

Constructor & Destructor Documentation

◆ WebSocketConnection()

◆ ~WebSocketConnection()

Member Function Documentation

◆ binaryMessageRecieved

void binaryMessageRecieved ( const QByteArray & array)
protectedslot

◆ bytesAvailable()

uint04 bytesAvailable ( ) const
overridevirtual

Implements ConnectionBackend.

◆ close()

void close ( )
overridevirtual

Implements ConnectionBackend.

◆ handleSocketErrorSlot

void handleSocketErrorSlot ( int error)
protectedslot

◆ isOpen()

bool isOpen ( ) const
overridevirtual

Implements ConnectionBackend.

◆ lastError()

TranslatedString lastError ( ) const
overridevirtual

Implements ConnectionBackend.

◆ open()

bool open ( const ConnectionInfo & request)
overridevirtual

Implements ConnectionBackend.

◆ peek()

uint04 peek ( char * s,
uint04 size ) const
overridevirtual

Implements ConnectionBackend.

◆ rx()

uint04 rx ( char * s,
uint04 size = Constant<uint04>::Max )
overridevirtual

Implements ConnectionBackend.

◆ setPort()

bool setPort ( QWebSocket * tcp_port)
virtual

◆ setSocket()

void setSocket ( QWebSocket * socket)

◆ textMessageRecieved

void textMessageRecieved ( const QString & message)
protectedslot

◆ tx()

void tx ( const String & command)
overridevirtual

Implements ConnectionBackend.

◆ waitForConnection()

bool waitForConnection ( QWebSocket * socket,
const ConnectionInfo & request )
virtual

◆ waitForReadyRead()

bool waitForReadyRead ( const TimeSpan & span)
overridevirtual

Implements ConnectionBackend.

Member Data Documentation

◆ m_data

String m_data
protected

◆ m_last_error

TranslatedString m_last_error
protected

◆ m_socket

QWebSocket* m_socket = nullptr
protected

The documentation for this class was generated from the following files: