Examples of DBGpResponse


Examples of org.eclipse.php.internal.debug.core.xdebug.dbgp.protocol.DBGpResponse

    // <error id="app_specific_error_code">
    // <message>UI Usable Message</message>
    // </error>
    // </proxyinit>
    if (!registered) {
      DBGpResponse resp = sendcmd("proxyinit -p " + idePort + " -k " + currentIdeKey + " -m " + (multisession ? "1" : "0")); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$
      if (resp != null) {
        if (resp.getType() == DBGpResponse.PROXY_INIT
            && resp.getErrorCode() == DBGpResponse.ERROR_OK) {
          registered = true;
        } else {
          errorCode = resp.getErrorCode();
          errorMsg = resp.getErrorMessage();
        }
      }
    }
    return registered;
  }
View Full Code Here

Examples of org.eclipse.php.internal.debug.core.xdebug.dbgp.protocol.DBGpResponse

  public void unregister() {
    // IDE command
    //
    // proxystop -k ide_key
    if (registered) {
      DBGpResponse resp = sendcmd("proxystop" + " -k " + currentIdeKey); //$NON-NLS-1$ //$NON-NLS-2$
      registered = false;
      String isOk = DBGpResponse.getAttribute(resp.getParentNode(),
          "success"); //$NON-NLS-1$
      if (isOk == null || !isOk.equals("1")) { //$NON-NLS-1$
        DBGpLogger
            .logWarning(
                "Unexpected response from proxystop. ErrorCode=" + resp.getErrorCode() + ". msg=" + resp.getErrorMessage(), this, null); //$NON-NLS-1$ //$NON-NLS-2$
      }
    }
  }
View Full Code Here

Examples of org.eclipse.php.internal.debug.core.xdebug.dbgp.protocol.DBGpResponse

   * @param cmd
   *            the command to send
   * @return the response.
   */
  private DBGpResponse sendcmd(String cmd) {
    DBGpResponse dbgpResp = null;
    try {
      // TODO: look at reducing the timeout for connection failure.
      // Socket s = new Socket(proxyHost, proxyPort);
      Socket s = new Socket();
      InetSocketAddress server = new InetSocketAddress(proxyHost,
          proxyPort);
      InetSocketAddress local = new InetSocketAddress(0);
      s.bind(local);
      s.connect(server, PROXY_CONNECT_TIMEOUT);

      InputStream is = s.getInputStream();
      OutputStream os = s.getOutputStream();
      if (DBGpLogger.debugCmd()) {
        DBGpLogger.debug("cmd: " + cmd); //$NON-NLS-1$
      }
      os.write(cmd.getBytes("ASCII")); //command will always be ASCII //$NON-NLS-1$
      os.flush();
      byte[] resp = readResponse(is);
      dbgpResp = new DBGpResponse();
      dbgpResp.parseResponse(resp);
      s.shutdownInput();
      s.shutdownOutput();
      s.close();
      return dbgpResp;
    } catch (IOException ioe) {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.