> ## Documentation Index
> Fetch the complete documentation index at: https://klef.ai/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# ConnectorBinding

> Serves a connector's calls over HTTP, as POST /{call} , where its host reaches it.

Serves a connector's calls over HTTP, as `POST /{call}`, where its host reaches it.

```csharp
public sealed class ConnectorBinding : IAsyncDisposable
```

**Implements:** `IAsyncDisposable`

## Fields

**AuthHeaderPrefix** `string` *required*

The prefix of each header the caller's auth resolved to, as `Connector-Auth-Authorization`.

**ConnectionHeader** `string` *required*

The header naming the connection a call is for.

**ListenVariable** `string` *required*

Where a connector listens: `127.0.0.1:7001`, or `unix:/path/to.sock`.

**SettingsHeader** `string` *required*

The header carrying the connection's values that are not secret, as a JSON object.

## Properties

**Listen** `string` *required*

Where the binding listens, with the port it was given.

## Methods

### DisposeAsync()

```csharp
public ValueTask DisposeAsync()
```

Stops serving.

#### Returns

`ValueTask`

### StartAsync()

```csharp
public static Task<ConnectorBinding> StartAsync(object connector, ConnectorManifest manifest, Func<string, ConnectionContext> contexts, string listen, CancellationToken cancellationToken, ILogger? logger = null)
```

Starts serving a connector's calls.

#### Parameters

**connector** `object` *required*

**manifest** `ConnectorManifest` *required*

**contexts** `Func\<String,ConnectionContext\>` *required*

**Type:** `Func<String,ConnectionContext>`

**listen** `string` *required*

**cancellationToken** `CancellationToken` *required*

**logger** `ILogger`

#### Returns

`Task<ConnectorBinding>`

### WaitAsync()

```csharp
public Task WaitAsync(CancellationToken cancellationToken)
```

Serves until the token cancels.

#### Parameters

**cancellationToken** `CancellationToken` *required*

#### Returns

`Task`


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.