# Room Connection Handler

This class provides a set of methods that listen for network events related to room operations.

### Methods

1. ```csharp
   OnServerCreateRoom(Action<NetworkConnectionToClient, RoomInfo> callback)
   ```
   * This method is used to determine the function that will run when a room is created on the server side. This function is called when a room is created by a client.
2. ```csharp
   OnServerJoinRoom(Action<NetworkConnectionToClient, string> callback)
   ```
   * This method is used to determine the function that will run when joining a room on the server side. This function is called by a client when it joins the room.
3. ```csharp
   OnServerExitRoom(Action<NetworkConnectionToClient, bool> callback)
   ```
   * This method is used to determine the function that will run when a room exit occurs on the server side. This function is called when a client leaves the room.
4. ```csharp
   OnClientRoomListAdd(Action<RoomInfo> callback)
   ```
   * This method is used to determine the function that will run when added to the room on the client side. This function is called when a room is added to the client.
5. ```csharp
   OnClientRoomListUpdate(Action<RoomInfo> callback)
   ```
   * This method is used to determine the function that will run when the room list is updated on the client side. This function is called when the room list is updated.
6. ```csharp
   OnClientRoomListRemove(Action<RoomInfo> callback)
   ```
   * This method is used on the client side to determine the function that will run when a room is removed from the list. This function is called when a room is removed from the list.
7. ```csharp
   OnClientConnectionMessage(Action<int> callback)
   ```
   * This method is used to determine the function that will run when a connection message is received on the client side. This function is called when a connection message is received by a client.


---

# 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://reflective-roommanager.gitbook.io/docs/user-manual/network/room/handlers/room-connection-handler.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.
