public void stop(){
synchronized (this) {
    mStopped=true;
    if (mListenerThread == null) {
      return;
    }
  }
  mListenerThread.interrupt();
  try {
    if (mServerSocket != null) {
      mServerSocket.close();
    }
  }
 catch (  IOException e) {
  }
}

public void stop ( ) { synchronized ( this ) { mStopped = true ; if ( mListenerThread == null ) { return ; } } mListenerThread . interrupt ( ) ; try { if ( mServerSocket != null ) { mServerSocket . close ( ) ; } } catch ( IOException e ) { } }
stops the listener thread and unbinds the address .
