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

#include <SocketConnection.h>

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

Public Member Functions

 SocketConnection (ProgressInfo *log)
 
 ~SocketConnection ()
 
virtual uint04 peek (char *, uint04 size) const final override
 
virtual uint04 rx (char *, uint04 size=Constant< uint04 >::Max) final override
 
virtual void tx (const String &command) final override
 
virtual bool open (const ConnectionInfo &request) final override
 
virtual void close () final override
 
virtual bool isOpen () const final override
 
virtual uint04 bytesAvailable () const override
 
virtual TranslatedString lastError () const final override
 
virtual bool setTCPPort (QTcpSocket *tcp_port, ConnectionOpenType connect_mode)
 
virtual bool setUDPPort (QUdpSocket *udp_port, ConnectionOpenType connect_mode)
 
virtual bool waitForReadyRead (const TimeSpan &span) final override
 
virtual bool waitForConnection (QAbstractSocket *socket, const ConnectionInfo &request)
 
void setSocket (QAbstractSocket *socket)
 
bool openUDP (const ConnectionInfo &request)
 
bool openUDPServer (const ConnectionInfo &request)
 
bool openTCP (const ConnectionInfo &request)
 
- Public Member Functions inherited from ConnectionBackend
 ConnectionBackend (ProgressInfo *log)
 
virtual String threadID () const
 

Protected Slots

void handleSocketErrorSlot (int error)
 

Protected Attributes

QAbstractSocket * m_socket = nullptr
 
TranslatedString m_last_error
 
uint02 m_broadcast_port = Constant<uint02>::NaN
 
- Protected Attributes inherited from ConnectionBackend
ProgressInfom_log
 

Additional Inherited Members

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

Constructor & Destructor Documentation

◆ SocketConnection()

◆ ~SocketConnection()

Member Function Documentation

◆ bytesAvailable()

uint04 bytesAvailable ( ) const
overridevirtual

Implements ConnectionBackend.

◆ close()

void close ( )
finaloverridevirtual

Implements ConnectionBackend.

◆ handleSocketErrorSlot

void handleSocketErrorSlot ( int error)
protectedslot

◆ isOpen()

bool isOpen ( ) const
finaloverridevirtual

Implements ConnectionBackend.

◆ lastError()

TranslatedString lastError ( ) const
finaloverridevirtual

Implements ConnectionBackend.

◆ open()

bool open ( const ConnectionInfo & request)
finaloverridevirtual

Implements ConnectionBackend.

◆ openTCP()

bool openTCP ( const ConnectionInfo & request)

◆ openUDP()

bool openUDP ( const ConnectionInfo & request)

◆ openUDPServer()

bool openUDPServer ( const ConnectionInfo & request)

◆ peek()

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

Implements ConnectionBackend.

◆ rx()

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

Implements ConnectionBackend.

◆ setSocket()

void setSocket ( QAbstractSocket * socket)

◆ setTCPPort()

bool setTCPPort ( QTcpSocket * tcp_port,
ConnectionOpenType connect_mode )
virtual

◆ setUDPPort()

bool setUDPPort ( QUdpSocket * udp_port,
ConnectionOpenType connect_mode )
virtual

◆ tx()

void tx ( const String & command)
finaloverridevirtual

Implements ConnectionBackend.

◆ waitForConnection()

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

◆ waitForReadyRead()

bool waitForReadyRead ( const TimeSpan & span)
finaloverridevirtual

Implements ConnectionBackend.

Member Data Documentation

◆ m_broadcast_port

uint02 m_broadcast_port = Constant<uint02>::NaN
protected

◆ m_last_error

TranslatedString m_last_error
protected

◆ m_socket

QAbstractSocket* m_socket = nullptr
protected

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