@Override
	public void run() {	

		boolean exit = false;
		try {
			socket = new Socket("localhost", this._desPort);
		} catch (UnknownHostException e) {
			//e.printStackTrace();
			System.out.println(_desPort+" has not been initialized.");
			exit = true;

		} catch (IOException e) {
			//e.printStackTrace();
			System.out.println(_desPort+" has not been initialized.");
			exit = true;
		}finally{
			if(exit == true)
			return ;
		} 

		if(socket == null) {
				
			System.out.println(" socket = null.");
			return ;
		}

		MachineBook.Builder machineBook = MachineBook.newBuilder();
   
		try {
			machineBook.addMachine( convert( _cmd )) ;

			while(true){
				OutputStream OS = socket.getOutputStream();
				machineBook.build().writeTo(OS);

				Thread.currentThread().sleep(5000);
				System.out.println(" constanly sending messages. ");
				OS.flush();

			}

		} catch (InterruptedException e) {
			e.printStackTrace();
		} catch (IOException e) {
			e.printStackTrace();
		}  finally {
			if(socket != null)
				try {
					socket.close();
				} catch (IOException e) {
					// TODO Auto-generated catch block
					e.printStackTrace();
				}
		}
	}