# rollup.gio

Performs a **generic IO** request: sends a request to a device *domain* outside the machine and blocks until the response arrives. This is the extension point for host-provided services beyond the rollup protocol — for example fetching data from a dehashing device.

Like [`finish`](/cmio/reference/finish), the call yields the machine while it waits.

## Usage

```ts twoslash
import { Rollup } from '@deroll/cmio';
const rollup = new Rollup();
// ---cut---
const response = rollup.gio({
    domain: 0x2a,
    id: '0x68656c6c6f',
});
response;
// ^?
```

On the host mock, gio responses are configured through `CMT_INPUTS` — any reason other than `0`/`1` is delivered as a gio reply with that response code (see [Testing on the Host](/cmio/guide/testing#feeding-inputs)).

## Returns

`GioResponse`:

| Field | Type | Description |
| --- | --- | --- |
| `responseCode` | `number` | Domain-defined status code |
| `responseData` | `Buffer` | Response payload |

## Parameters

### domain

* Type: `number`
* Required

The `uint16` identifier of the device domain the request targets.

### id

* Type: `BytesLike` — 0x-prefixed hex string, `Buffer` or `Uint8Array`
* Required

The request data, in the domain's own format.

## Errors

| Condition | Error |
| --- | --- |
| Malformed `id` / wrong argument type | `TypeError` |
| Domain not available / device failure | `RollupError` with negative `errno` |
