public static void main(String[] args) {
		
		if(args.length != 3) {
			printUsage();
		}
		
		short port = Short.parseShort(args[0]);
		int window = Integer.parseInt(args[1]);
		int timeout = Integer.parseInt(args[2]);
		inputCheck(port, window, timeout);

		System.out.println("Starting 740Ftp server...");
		
		try {
			TTPService ttpService = new TTPService((short) port, window, timeout);
			
			while (true) {
				System.out.println("waiting for connection...");

				/*
				 * Accept a connection for further communication with the
				 * client. This connection is sure for this client. Further
				 * connections are still accepted on server
				 */
				ttpService.accept();

				System.out.println("Accpeted new connection from "
						+ ttpService.desIP + ":" + ttpService.desPort);

				FTPServerThread serverThread = new FTPServerThread(ttpService);
				Thread thread = new Thread(serverThread);
				thread.start();
				thread.join();
			}
		} catch (IOException e) {
			e.printStackTrace();
		} catch (ClassNotFoundException e) {
			e.printStackTrace();
		} catch (InterruptedException e) {
			e.printStackTrace();
		}

	}