public void launch() {
		try {
			//input own a and b, not fix mode
			System.out.println("Please input a to find ath prime");
			Scanner s = new Scanner(System.in);
			int a = s.nextInt();
			System.out.println("Please input b to find bth prime");
			int b = s.nextInt();
			if(a <=6){
				a +=  6;
				System.out.println("Input too small, auto shifted;");
			}
			if(b <= 6){
				b += 6;
				System.out.println("Input too small, auto shifted;");
			}
			RSA geRSA = new RSA(a, b, false);
			System.out.println("Your public key n is "+geRSA.getN()+" and e is "+geRSA.getE());
			
			
			
			// input other's n and e
			System.out.println("Please input the other people's n");
			n = s.nextInt();
			System.out.println("n is "+n);
			System.out.println("Please input e");
			e = s.nextInt();
			System.out.println("e is "+e);
			
			if(mode == ChatServer.SERVICE_MODE.FOLLOWER){
				client.setN(n);
				client.setE(e);
				client.start();
			}
			
			ServerSocket sskt = new ServerSocket(this.port);
			System.out.println("Listener start listen!");
			Socket skt = sskt.accept();

			
			//inputstream:
			InputStream its = skt.getInputStream();
			System.out.println("Connection formed");

			if(mode == ChatServer.SERVICE_MODE.STARTER){
				String host = skt.getInetAddress().getHostAddress();
				client = new ChatClient(host, DEFAULT_PORT);
				client.setN(n);
				client.setE(e);
				client.start();
			}

			InputStreamReader isr = new InputStreamReader(its);
			BufferedReader br= new BufferedReader(isr);
			String line = br.readLine();

			while(true) {
				String decypher = geRSA.decypher(line);
				if(decypher.equals(".bye") || decypher.equals("quit")){
					break;
				}
				System.out.print("Received: ");
				System.out.println(geRSA.decypher(line));
				
				line = br.readLine();
				if(line == null){
					System.out.println("Connection broken, auto quit");
					break;
				}
			}
			
			System.out.println("Exit...");
			client.interrupt();
			System.exit(0);

		} catch (IOException e) {
			System.err.println("Server Socket error");
			e.printStackTrace();
		}
	}