# Events

### <mark style="color:purple;">Connection Successful</mark>

Fires when the client establishes a connection to the local websocket server.

***

### <mark style="color:purple;">Connection Refused</mark>

Fires when the client is unable to connect to the local websocket server.

***

### <mark style="color:purple;">Connection Lost</mark>

Fires when the connection between the client & server is lost.

***

### <mark style="color:purple;">Message Received</mark>

Fires when the server sends the client a message.

***

### <mark style="color:purple;">Message Failed To Send</mark>

Fires when the client is unable to send a message to the server.


---

# 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://deskifier.gitbook.io/deskifier/deskifier-bubble.io-docs/websocket-client-element/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.
