## Overview

These functions are used to:

- Send information to the Java client, and
- Send the processed allocation or receive the next allocation to process.

<br />

## Summary

| Functions ||
|---|---|
| [rsAllocationIoReceive](https://developer.android.com/guide/topics/renderscript/reference/rs_io#android_rs:rsAllocationIoReceive) | Receive new content from the queue |
| [rsAllocationIoSend](https://developer.android.com/guide/topics/renderscript/reference/rs_io#android_rs:rsAllocationIoSend) | Send new content to the queue |
| [rsSendToClient](https://developer.android.com/guide/topics/renderscript/reference/rs_io#android_rs:rsSendToClient) | Send a message to the client, non-blocking |
| [rsSendToClientBlocking](https://developer.android.com/guide/topics/renderscript/reference/rs_io#android_rs:rsSendToClientBlocking) | Send a message to the client, blocking |

## Functions

#### rsAllocationIoReceive
: Receive new content from the queue

|---|---|
| void rsAllocationIoReceive([rs_allocation](https://developer.android.com/guide/topics/renderscript/reference/rs_object_types#android_rs:rs_allocation) a); | Added in [API level 16](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |

##### Parameters

| a | Allocation to work on. |
|---|---|

Receive a new set of contents from the queue.

This function should not be called from inside a kernel, or from any function
that may be called directly or indirectly from a kernel. Doing so would cause a
runtime error.  

#### rsAllocationIoSend
: Send new content to the queue

|---|---|
| void rsAllocationIoSend([rs_allocation](https://developer.android.com/guide/topics/renderscript/reference/rs_object_types#android_rs:rs_allocation) a); | Added in [API level 16](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) |

##### Parameters

| a | Allocation to work on. |
|---|---|

Send the contents of the Allocation to the queue.

This function should not be called from inside a kernel, or from any function
that may be called directly or indirectly from a kernel. Doing so would cause a
runtime error.  

#### rsSendToClient
: Send a message to the client, non-blocking

|---|---|
| bool rsSendToClient(int cmdID); |   |
| bool rsSendToClient(int cmdID, const void\* data, [uint](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:uint) len); |   |

##### Parameters

| cmdID |   |
| data | Application specific data. |
| len | Length of the data, in bytes. |
|---|---|

Sends a message back to the client. This call does not block.
It returns true if the message was sent and false if the
message queue is full.

A message ID is required. The data payload is optional.

See [RenderScript.RSMessageHandler](https://developer.android.com/reference/android/renderscript/RenderScript.RSMessageHandler.html).  

#### rsSendToClientBlocking
: Send a message to the client, blocking

|---|---|
| void rsSendToClientBlocking(int cmdID); |   |
| void rsSendToClientBlocking(int cmdID, const void\* data, [uint](https://developer.android.com/guide/topics/renderscript/reference/rs_value_types#android_rs:uint) len); |   |

##### Parameters

| cmdID |   |
| data | Application specific data. |
| len | Length of the data, in bytes. |
|---|---|

Sends a message back to the client. This function will block
until there is room on the message queue for this message.
This function may return before the message was delivered and
processed by the client.

A message ID is required. The data payload is optional.

See [RenderScript.RSMessageHandler](https://developer.android.com/reference/android/renderscript/RenderScript.RSMessageHandler.html).