code: protected void sendMessage(String xml) {
      byte[] bytes = null;
      try {
        bytes = xml.getBytes("UTF-8");
        writeBytes(bytes);
      } catch (SocketException se) {
        // when we get a socket exception, let's try to re-establish
        stop();
        start();
        try {
          writeBytes(bytes);
        } catch (IOException e) {
          throw new WebDriverException(e);
        }
      } catch (IOException e) {
        throw new WebDriverException(e);
      }
    }
docs: sends the message to the AUT.