public static void sendToClient(int statusCode, DirectoryClientList directory, InetAddress clientAddress, int clientPort) {
		String statusPhrase = new String();
		switch(statusCode) {
		case 200:
			statusPhrase = "OK";
			break;
		case 201:
			statusPhrase = "OK Peerlist";
			break;
		case 400:
			statusPhrase = "Unknown Request";
			break;
		case 401:
			statusPhrase = "User Exists";
			break;
		case 402:
			statusPhrase = "User Already Offline";
			break;
		case 500:
			statusPhrase = "Not Implemented";
			break;
		}

		StringBuilder sb = new StringBuilder();
		String s = new String();
		if(directory == null) {
			s = PROTOCOL_VERSION + " " + statusCode + " " + statusPhrase + CRLF;
		} else {
			sb.append(PROTOCOL_VERSION + " " + statusCode + " " + statusPhrase + CRLF);

			for ( DirectoryClientEntry client : directory.clientList) {
				sb.append("Client: username="+client.username+" host="+client.hostIP.toString()+" port="+client.protocolPort+" rating="+client.rating+" room="+client.usernameChatroom+ CRLF);
			}

			s = sb.toString();
		}

		System.out.println("DEBUG: Would send response: "+s);
		System.out.println("DEBUG: Trying to send to: "+clientAddress.getHostAddress()+":"+clientPort);
		DatagramPacket p = new DatagramPacket(s.getBytes(), s.getBytes().length, clientAddress, clientPort);
		try {
			receiveFromClient.socket.send(p);
		} catch (IOException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
		
	}