public MainServer(String [] args) { ipAddress = args[0]; // The IP address to bind on RoomMap = new Dictionary <String, RoomThread>(); for (int i = 1; i < args.Length; i++) { if (RoomMap.ContainsKey(args[i])) { Console.WriteLine("Skipping redundant room " + args[i]); } else { Console.WriteLine("Creating room " + args[i]); room = new RoomThread(args[i]); RoomMap.Add(args[i], room); } RoomThread_Thread = new Thread(room.run); RoomThread_Thread.Start(); } }
public ClientThread(RoomThread newroom, UTF8Socket newSock, String newName) { sock = newSock; room = newroom; name = newName; }