/// <summary> /// This method returns server singleton with specified port. /// </summary> /// <param name="socketAddress">IP:PORT that user enters</param> /// <returns>Server singleton with specified port</returns> public static Server getInstance(string socketAddress) { if (serverInstance == null) { serverInstance = new Server(socketAddress); } return serverInstance; }
/// <summary> /// Factory method. /// </summary> /// <returns>Server with port '8080' </returns> public static Server getInstance() { if (serverInstance == null) { serverInstance = new Server(); } return serverInstance; }