ServerProject-DONT-IMPORT-INTO-UNITY/LRM/RelayHandler/RelayHandlerRoomMethods.cs
Method JoinRoom
has 52 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
private void JoinRoom(int clientId, string serverId, bool canDirectConnect, string localIP)
{
LeaveRoom(clientId);
if (_cachedRooms.ContainsKey(serverId))
Method LeaveRoom
has 44 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
private void LeaveRoom(int clientId, int requiredHostId = -1)
{
for (int i = 0; i < rooms.Count; i++)
{
// if host left
Method CreateRoom
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
private void CreateRoom(int clientId, int maxPlayers, string serverName, bool isPublic, string serverData, bool useDirectConnect, string hostLocalIP, bool useNatPunch, int port)
{
LeaveRoom(clientId);
Program.instance.NATConnections.TryGetValue(clientId, out IPEndPoint hostIP);
Method CreateRoom
has 9 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
private void CreateRoom(int clientId, int maxPlayers, string serverName, bool isPublic, string serverData, bool useDirectConnect, string hostLocalIP, bool useNatPunch, int port)