interface · Node only

# Relay

`@toip-tools/relay` · [View source](https://github.com/yourbuddyconner/toip-tools/blob/main/packages/relay/src/server.ts#L19)

Import:

```ts
import { type Relay } from "@toip-tools/relay";
```

## Declaration

interface:

```ts
interface Relay {
  /** The URL clients connect to and sign in their authentication. */
  url: string;
  port: number;
  /** How many messages wait for `did`. */
  queued(did: string): number;
  close(): Promise<void>;
}
```

## Properties

**`url` (required)**

`string`

The URL clients connect to and sign in their authentication.

**`port` (required)**

`number`

## Methods

### `queued`

How many messages wait for `did`.

Signature:

```ts
queued(did: string): number;
```

#### Parameters

- **`did` (required)**: `string`

#### Returns

`number`

### `close`

Signature:

```ts
close(): Promise<void>;
```

No parameters.

#### Returns

`Promise<void>`

[Usage guide](https://toip.tools/toolkit/relay/#usage) · [Error handling](https://toip.tools/toolkit/relay/#errors) · [All exports](https://toip.tools/toolkit/relay/api/)

---

This is the Markdown version of https://toip.tools/toolkit/relay/api/Relay/. An index of the documentation for AI assistants is at https://toip.tools/llms.txt.
