Call onDataAvailable when there are incoming data available on socket opened via connect() or
in another way (QLocalSocket, etc.).

 

Parameters:

 

bytes - number of bytes available to read from socket, -1 if the number of bytes is unknown

 

Return:

 

errno error code:

 

* EINVAL if EveusbEventHandler was not set via setEventHandler or in case of some other
errors
* E2BIG if message from the daemon exceeds MSG_LEN_MAX bytes *
EIO if underlying call to readFromDaemon() returned -1
* ENODATA if readFromDaemon() returned zero (connection was closed by remote side)

 

Note:

 

See poll/select, QLocalSocket::onDataAvailable, etc.

 

Remarks:

 

To perform read on socket, this method calls EveusbEventHandler::readFromDaemon(). If a
complete message is received from the daemon, it calls onMessage() and the corresponding
member of EveusbEventHandler.

 

You should close the socket if an error is returned.