public boolean send(String text) throws IOException {
		if (!this.handshakeComplete)
			throw new NotYetConnectedException();
		if (text == null)
			throw new NullPointerException(
					"Cannot send 'null' data to a WebSocket.");
		List<Framedata> frames = draft.createFrames(text, true);
		if (frames.isEmpty()) {
			return true;
		}
		boolean sendall = true;
		for (Framedata f : frames) {
			sendall = sendFrame(f); // TODO high frequently calls to sendFrame
									// are inefficient.
		}
		return sendall;
	}