Example #1
0
  @Override
  public void run() {

    Socket clientSocket;
    ProxyThread process;

    while (isProxyRunning) {
      try {
        clientSocket = proxySocket.accept();
        process = createProxyProcess(clientSocket);
        process.start();

      } catch (SocketTimeoutException e) {
        // nothing, socket time reached only.
      } catch (IOException e) {
        // unknown IO exception - continue but with delay to avoid eating up CPU time if continue
        try {
          Thread.sleep(100);

        } catch (InterruptedException e1) {
        }
      }
    }
  }
Example #2
0
 public boolean isAnyProxyThreadRunning() {
   return ProxyThread.isAnyProxyThreadRunning();
 }