private void getRequestClient(String request) throws JDOMException,
			IOException, TagFormatException {
		Document mDocument = builder.build(new StringReader(request));
		Element rootNode = mDocument.getRootElement();
		String protType = rootNode.getName();
		if (protType.equals(Tags.SESSION)) {
			name = rootNode.getChildText(Tags.PEER_NAME);
			int port = Integer.parseInt(rootNode.getChildText(Tags.PORT));

			if (list.check(name)) {
				list.add(name, ip, port);
				time_count = 60;
				String temp = list.createListInfo(name);
				writer.writeUTF(temp);
				writer.flush();
				System.out.println("Send: " + temp);
			} else {
				writer.writeUTF("<SESSION_DENY />");
				writer.flush();
			}
		} else if (protType.equals(Tags.SESSION_KEEP_ALIVE)) {
			String name_s = rootNode.getChildText(Tags.PEER_NAME);
			String status = rootNode.getChildText(Tags.STATUS);
			if (status.equals("ALIVE")) {
				ClientInfo temp_ci = list.find(name_s);
				if (temp_ci != null) {
					time_count = 60;
					String temp = list.createListInfo(name);
					writer.writeUTF(temp);
					writer.flush();
				}
			} else if (status.equals(Tags.WILL_BE_KILL)) {
				list.deleteClientInfo(name_s);
			}
		} else {
			TagFormatException tfe = new TagFormatException(
					"wrong tag format: " + protType);
			throw tfe;
		}

	}