public void send(final Data data) throws IOException {
		System.out.print("Connecting...");
		Socket socket = new Socket(Network.HOST, Network.TCP_PORT);
		System.out.println(" DONE!");
		InputStream is = socket.getInputStream();
		System.out.println("Got outputstream...");
		byte[] bytes = net.toByteArray(data);
		String path = "/cgi-bin/CaveScores?POST";
		String postRequest = "POST " + path + " HTTP/1.1\r\nHost: "
				+ Network.HOST + "\r\nContent-Length: " + bytes.length
				+ "\r\n\r\n";
		System.out.println("sending... ");
		OutputStream os = socket.getOutputStream();
		os.write(postRequest.getBytes("UTF-8"));
		os.write(bytes);
		os.flush();
		System.out.println("sent!");

		// receive message
		int b;
		char ltt = 0;
		char lt = 0;
		char l = 0;
		long now = System.currentTimeMillis();
		ByteArrayOutputStream baos = new ByteArrayOutputStream();
		StringBuilder sb = new StringBuilder();

		try {
			Thread.sleep(100);
		} catch (InterruptedException e) {
			e.printStackTrace();
		}

		while (true) {
			if (System.currentTimeMillis() - now > 5000)
				break;

			if (is.available() < 1) {
				try {
					Thread.sleep(20);
				} catch (InterruptedException e) {
					e.printStackTrace();
				}
				continue;
			}

			b = is.read();
			char c = (char) b;
			sb.append(c);

			if (c == '\n' && l == '\r' && lt == '\n' && ltt == '\r') {
				break;
			}
			ltt = lt;
			lt = l;
			l = c;
		}

		System.out.println(sb.toString());

		System.out.println("Exit.");
		os.close();
		is.close();
		socket.close();
	}