public boolean processing(OutputStream out, InputStream in,int operation){
		try{
			BufferedReader bf = new BufferedReader(new InputStreamReader(in));
			PrintWriter toClient= new PrintWriter(out,true);
			toClient.println("Hello,Dude!\n" +
					"Choose one menu item and send me number of this operation:\n" +
					"1 - Show next message on server\n" +
					"2 - Multiply two numbers and  recceive result of this operation\n" +
					"3 - Ping server\n" +
					"-1 or 0 - abort connectin with server.\n" +
					"Thank you dude. :)");
			Integer first_command = Integer.parseInt(bf.readLine());
			switch(first_command){
				case 1:
					System.out.println(bf.readLine());
					toClient.println("Message is writen");
					break;
				case 2:
					toClient.println("Please, input first number to multipling");
					Integer f = Integer.parseInt(bf.readLine());
					toClient.println("Please, input second number to multipling");
					Integer s = Integer.parseInt(bf.readLine());
					toClient.println("Result of multipling is "+ new Integer(f*s));
					break;
				case 3:
					toClient.println("ping me,Baby");
					break;
				case -1:
				case 0:
					sock.close();
					return false;
				default:
					throw new NumberFormatException("Wrong choise,Baby!");
			}
		}catch(IOException e){
			return false;
		}catch(NumberFormatException e){
			PrintWriter toClient= new PrintWriter(out,true);
			toClient.println("Wrong format of message. Try again.");
			waitrate++;
			return processing(out, in,0);
		}
		return true;
		
	}