public synchronized boolean stopServer(){
  if (!isProxyRunning) {
    return false;
  }
  isProxyRunning=false;
  HttpUtil.closeServerSocket(proxySocket);
  try {
    thread.join();
  }
 catch (  Exception e) {
  }
  proxySocket=null;
  return true;
}

public synchronized boolean stopServer ( ) { if ( ! isProxyRunning ) { return false ; } isProxyRunning = false ; HttpUtil . closeServerSocket ( proxySocket ) ; try { thread . join ( ) ; } catch ( Exception e ) { } proxySocket = null ; return true ; }
stops the proxy server .
