class Connection |
|
This class provides a simple means for IPC between two applications via a pipe. It handles a queue of commands to be sent which makes it possible to queue data before an actual connection has been established. |
|
Creates a new connection.
See also connectToRemote, listenForRemote |
|
Closes the connection. |
|
Connects to the remote address. |
|
|
Returns true if there are packets to be read immediately, false if waitForIncomingTask must be called before more data is available. |
|
Checks whether the connection has been initialized.
Returns true if the initialized
See also init() |
|
|
Receive data.
_cmd - the received command will be written here data - the received data will be written here Returns >=0 indicates the received data size upon success -1 indicates error |
|
|
Resume handling of incoming data. |
|
Sends/queues the given command to be sent.
cmd - the command to set arr - the bytes to send Returns true if successful, false otherwise |
|
Sends the given command immediately.
_cmd - the command to set data - the bytes to send Returns true if successful, false otherwise |
|
Don't handle incoming data until resumed. |
|
Returns status of connection. Returns true if suspended, false otherwise |
|
Waits for one more command to be handled and ready.
ms - the time to wait in milliseconds Returns true if one command can be read, false if we timed out |