Class handling the connection exchanging data using a QIODevice.
More...
#include <ServerConnection.h>
|
| | ServerConnection (QIODevice *ioDevice, QObject *parent=nullptr) |
| | Constructor for passing a socket descriptor.
|
| | ~ServerConnection () override |
| bool | process () |
| | Non-blocking method which processes data incoming and outgoing data from the IO device.
|
| void | setState (EState state) |
| void | relayThread () |
| | Allows this instance to do main thread handling.
|
|
| typedef unsigned long long | id_type |
| | Type used for the identifying integer (64-bits).
|
| typedef int32_t | flags_type |
| | Type used for the flag integer.
|
| typedef size_t | size_type |
| | Type used for size of vectors.
|
| typedef ssize_t | ssize_type |
| | Same as size_type but a signed version.
|
| typedef uintptr_t | data_type |
| | Type used for containing a single data element which is the largest integer.
|
| typedef intptr_t | sdata_type |
| | Type used for containing a single data element which is the largest signed integer.
|
| typedef TVector< id_type > | IdVector |
| | Vector for lists of information ID's.
|
| typedef TVector< InformationBase * > | Vector |
| | Vector for containing different information base derived classes.
|
| template<typename T> |
| static constexpr std::enable_if_t<(sizeof(T)<=sizeof(data_type)), data_type > | toDataType (T value) |
| | Casts any type to a data_type value.
|
| template<typename T> |
| static constexpr std::enable_if_t<(sizeof(T)<=sizeof(data_type)||std::is_reference_v< T >), T > | fromDataType (data_type value) |
| | Casts a data_type value to a given type. Reference types are also possible since they are the same size as a pointer underwater.
|
| static constexpr size_t | npos = std::numeric_limits<size_type>::max() |
| | Unsigned size value indicating not found or no index.
|
Class handling the connection exchanging data using a QIODevice.
◆ EState
| Enumerator |
|---|
| sError | |
| sNone | |
| sHeaderRead | |
| sPayloadRead | |
| sPayloadProcess | |
| sBufferWrite | |
| sWaitForRead | |
◆ ServerConnection()
| sf::ServerConnection::ServerConnection |
( |
QIODevice * | ioDevice, |
|
|
QObject * | parent = nullptr ) |
|
explicit |
Constructor for passing a socket descriptor.
◆ ~ServerConnection()
| sf::ServerConnection::~ServerConnection |
( |
| ) |
|
|
override |
◆ process()
| bool sf::ServerConnection::process |
( |
| ) |
|
Non-blocking method which processes data incoming and outgoing data from the IO device.
- Returns
- True when it needs to be called again.
◆ relayThread()
| void sf::ServerConnection::relayThread |
( |
| ) |
|
Allows this instance to do main thread handling.
◆ setState()
| void sf::ServerConnection::setState |
( |
EState | state | ) |
|
The documentation for this class was generated from the following file: