public static void handleHelloReply(HTSMsg msg, HTSPClient client){
		Collection<String> requiredFields = Arrays.asList(new String[]{"htspversion","servername","serverversion","servercapability","challenge"});
		if (msg.keySet().containsAll(requiredFields)){
			for(String s : msg.keySet()){
				if(s.equals(HTSPVERSION)){
					client.serverInfo.setHtspversion((Long) msg.get(s));
				}
				else if (s.equals(SERVERNAME)){
					client.serverInfo.setServername((String) msg.get(s));
				}
				else if (s.equals(SERVERVERSION)){
					client.serverInfo.setServerversion((String) msg.get(s));
				}
				else if (s.equals(SERVERCAPABILITY)){
					client.serverInfo.setServercapability((List<String>) msg.get(s));
				}
				else if (s.equals(CHALLENGE)){
					client.serverInfo.setChallenge((byte[]) msg.get(s));
					try {
						client.authenticate();
					} catch (IOException e) {
						// TODO Auto-generated catch block
						e.printStackTrace();
					}
				}
			}
		} else if (msg.get("error") != null){
			//TODO
		} else {
			System.out.println("Faulty reply");
		}
	}