public static void RemoveMothership(MothershipModel mothership) { lock (Motherships) { Motherships.Remove(mothership); } }
public static MothershipModel CreateNewMothership(WebSocket socket) { lock (Motherships) { string newName = GetNewMothershipName(); var newMothership = new MothershipModel(socket, newName); Motherships.Add(newMothership); newMothership.StartConnection(); return(newMothership); } }
public ClientModel(WebSocket webSocket, string name, MothershipModel mothersip) : base(webSocket, name) { Mothership = mothersip; }