Room Server
This class provides a service that manages server operations related to rooms.
Methods
public static void CreateRoom(RoomInfo roomInfo)Parameters:
roomInfo: ARoomInfoobject that represents information about the room to be created.
It creates the room.
public static void CreateRoom(NetworkConnectionToClient conn, RoomInfo roomInfo)Parameters:
conn: The network connection of the client joining the room.roomInfo: ARoomInfoobject that represents information about the room to be created.
Creates the room and adds the specified client to the room.
public static void JoinRoom(string roomName)Parameters:
roomName: Name of the room to join.
Joins the specified room.
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.
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.
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.
public static void RemoveAllRoom(bool forced = false)Parameters:
forced: Used to forcibly remove entire rooms.
Removes all rooms.
Last updated