private boolean __doConnect() {
    XSocketContext sock = null;
    try {
      this.m_is_success = false;
      XAccount account = this.__getAccount();
      XEngineListener listener = this.m_engine_listener;
      DefaultXContext context =
          XContextFactory.Util.getFactory().createMutableContext(account, listener);
      sock = context.getSocketContext();
      EngineRunner runner = new DefaultEngineRunner(context);
      runner.run();
    } catch (Exception e) {
      // e.printStackTrace();
      System.err.println(e);
    }

    try {
      sock.getInput().close();
    } catch (Exception e) {
    }
    try {
      sock.getOutput().close();
    } catch (Exception e) {
    }
    try {
      sock.getSocket().close();
    } catch (Exception e) {
    }

    return this.m_is_success;
  }