# Function: answerConnectCode()

```ts
function answerConnectCode(options, onStage): Promise<{
  stop(): void;
}>;
```

Defined in: [packages/core/src/session/connect-code.ts:162](https://github.com/leifriksheim/minca/blob/main/core/src/session/connect-code.ts#L162)

Answers the program that opened the home with a code. Keep it running while
the page is open: the first program whose sealed ask opens is the one asked
about, and nobody after it.

## Parameters

| Parameter | Type |
| ------ | ------ |
| `options` | `CodeNetwork` & `object` |
| `onStage` | (`stage`) => `void` |

## Returns

`Promise`\<\{
  `stop`(): `void`;
\}\>

A way to stop listening; the code stops working
