> For the complete documentation index, see [llms.txt](https://arcane-3.gitbook.io/cloudy-api-documentation/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://arcane-3.gitbook.io/cloudy-api-documentation/chat-functions/disconnect.md).

# Disconnect

Disconnects the WebSocket client from the server.

{% hint style="danger" %}
This feature is deprecated and will be unsupported.
{% endhint %}

**Usage**:

```csharp
await ChatClient.Disconnect();
```

**Example**:

```csharp
try
{
    await ChatClient.Disconnect();
    Console.WriteLine("Disconnected from server.");
}
catch (Exception ex)
{
    Console.WriteLine($"Error during disconnection: {ex.Message}");
}
```
