public void connect() {
		try {
			Debug.print("I'm client, start to connect to host:"+host);
			Socket skt = new Socket(host, port);
			Debug.print("Connected");

			RSA rsa = new RSA();
			rsa.setN(this.n);
			rsa.setE(this.e);
			
			InputStreamReader isr = new InputStreamReader(System.in);			

			String publicKey = "("+this.e+" "+this.n+")";
			System.out.println("Encoding with"+publicKey);
			
			while(true) {
				char c = (char)isr.read();
				String toSend = "";
				if(c == '\n'){
					toSend = "\n";
				}else{
					toSend = rsa.getcypher(c+"");
					System.out.println(c+" is encoded to "+toSend);
				}
				for(int i = 0; i < toSend.length(); i++){
					skt.getOutputStream().write(toSend.charAt(i));
				}
				
			}
			
		} catch(ConnectException e){
			System.err.println("starter haven't started listening yet!!!\n please give server input info and run again!!!");
		}catch (IOException e) {
			System.err.println("Connect error");
			e.printStackTrace();
		}
	}