public static int openSocket() throws IOException {
  serverSocket=new ServerSocket(0,10,InetAddress.getLocalHost());
  return serverSocket.getLocalPort();
}

public static int openSocket ( ) throws IOException { serverSocket = new ServerSocket ( 0 , 10 , InetAddress . getLocalHost ( ) ) ; return serverSocket . getLocalPort ( ) ; }
open a socket to be used in synchronizing two asyncinvocations
