# WebSocket Client

#### Overview

The TransferChain SDK provides a **WebSocket Client** interface to enable real-time communication between clients and the TransferChain protocol. This is especially useful for applications that require instant notifications or updates

#### Key Features

* **Real-time updates**: Receive instant events as they occur within the TransferChain system.
* **Secure channel**: All WebSocket communications are end-to-end encrypted using your TransferChain session keys.
* **Lightweight**: The client maintains a persistent connection without the overhead of constant polling.
* **Pluggable**: Easily integrate into frontend apps, background services, or admin dashboards.

#### How It Works

1. **Authenticate** using your TransferChain credentials.
2. **Initialize** the WebSocket client with your session token.
3. **Subscribe** to events (e.g., file received, password accessed).
4. **Listen** for event messages and react in your app.

#### Security

* All events are encrypted and bound to your session.
* No third-party or public broadcast. Only authorized users can listen to relevant events.
* Tamper-proof message verification using TransferChain’s cryptographic signatures.

```
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.transferchain.io/blockchain-read-node/websocket-client.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
