31#include <QLocalSocket> 
   92    bool read(
void* buffer, 
int size);
 
  103    bool read(QVector<T>& values);
 
  117    static const char* channelIDString;
 
  122    bool readSocketTag();
 
  124    QLocalSocket* socket_; 
 
  136    if(!
read((
void*)&count, 
sizeof(
unsigned int)))
 
  143        qWarning() << 
"Too many samples waiting in socket. Flushing it to empty";
 
  147    values.resize(values.size() + count);
 
  148    if(!
read((
void*)values.data(), 
sizeof(T) * count))
 
  150        qWarning() << 
"Error occured while reading data from socket: " << socket_->errorString();
 
Helper class for reading socket datachannel from sensord.
SocketReader(QObject *parent=0)
Constructor.
~SocketReader()
Destructor.
bool dropConnection()
Drops socket connection.
bool isConnected()
Returns whether the socket is currently connected.
bool initiateConnection(int sessionId)
Initiates new data socket connection.
QLocalSocket * socket()
Provides access to the internal QLocalSocket for direct reading.
bool read(void *buffer, int size)
Attempt to read given number of bytes from the socket.