# Real Time Events

Quick Sync provides real time features via [SignalR ](https://dotnet.microsoft.com/en-us/apps/aspnet/signalr)Hubs using the WebSocket protocol.&#x20;

## Hubs

* /v1/hubs/session
* /v1/hubs/notepad
* /v1/hubs/chat

### Connecting to a hub&#x20;

Use one of the [SignalR clients](https://learn.microsoft.com/en-us/aspnet/core/signalr/client-features?view=aspnetcore-9.0) to connect to the hubs

#### Authentication

On the hubs authentication tokens need to be placed in the query parameter

`?access_token=<JWT-TOKEN>`&#x20;

## Session Hub

The session hub provides real time information of session events.

URL: `/v1/hubs/session`

Events:

```
UserAdded,
UserRemoved,
SessionExpired,
SessionDestroyed,
FileRemoved,
FileProgress,
FileAdded,
FileComplete
```

The event payload is:

```
{
  "sessionId": "",
  "eventType": "",
  "data": {
    <event payload>
  }
}
```

## Notepad Hub&#x20;

Coming soon.

## Chat Hub

Coming soon.


---

# 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.quicksync.me/qs-framework/real-time-events.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.
