Room Server

This class provides a service that manages server operations related to rooms.

Methods

  1. public static void CreateRoom(RoomInfo roomInfo)
    • Parameters:

      • roomInfo: A RoomInfo object that represents information about the room to be created.

    • It creates the room.

  2. public static void CreateRoom(NetworkConnectionToClient conn, RoomInfo roomInfo)
    • Parameters:

      • conn: The network connection of the client joining the room.

      • roomInfo: A RoomInfo object that represents information about the room to be created.

    • Creates the room and adds the specified client to the room.

  3. public static void JoinRoom(string roomName)
    • Parameters:

      • roomName: Name of the room to join.

    • Joins the specified room.

  4. public static void JoinRoom(NetworkConnectionToClient conn, string roomName)
    • Parameters:

      • conn: The network connection of the client joining the room.

      • roomName: Name of the room to join.

    • Adds the specified client to the specified room.

  5. public static void ExitRoom(NetworkConnectionToClient conn, bool isDisconnected)
    • Parameters:

      • conn: The network connection of the client joining the room.

      • isDisconnected: Indicates whether the client is disconnected.

    • Adds the specified client to the room.

  6. public static void RemoveRoom(string roomName, bool forced = false)
    • Parameters:

      • roomName: The room name to be removed.

      • forced: It is used to lift the room by force.

    • Removes the specified room.

  7. public static void RemoveAllRoom(bool forced = false)
    • Parameters:

      • forced: Used to forcibly remove entire rooms.

    • Removes all rooms.

Last updated