private void sendHandshake() throws Exception {
		String path = uri.getPath();
		if (path.indexOf("/") != 0) {
			path = "/" + path;
		}
		int port = getPort();
		String host = uri.getHost()
				+ (port != WebSocket.DEFAULT_PORT ? ":" + port : "");
		String origin = "x"; // TODO: Make 'origin' configurable

		HandshakedataImpl1 handshake = new HandshakedataImpl1();
		handshake.setResourceDescriptor(path);
		handshake.put("Host", host);
		handshake.put("Origin", origin);
		conn.startHandshake(handshake);
	}