public SocketWrapper accept() throws IOException {
  for (; ; ) {
    try {
      Socket sock=serverSocket.accept();
      return new SocketWrapper(sock);
    }
 catch (    SocketTimeoutException e) {
    }
catch (    IOException e) {
      if (done) {
        throw new SocketTerminationException("Server socket has been terminated",e);
      }
 else {
        throw e;
      }
    }
  }
}

public SocketWrapper accept ( ) throws IOException { for ( ; ; ) { try { Socket sock = serverSocket . accept ( ) ; return new SocketWrapper ( sock ) ; } catch ( SocketTimeoutException e ) { } catch ( IOException e ) { if ( done ) { throw new SocketTerminationException ( "Server socket has been terminated" , e ) ; } else { throw e ; } } } }
accepts a connection the server socket .
