491492493494495496497498499500501
try { mss = new MasterServerSocket(clientServerSocketPort + 101); log.info(mss.toString() + ": MasterServerSocket accepting"); os.write(3); Socket s = mss.accept(); log.info(mss.toString() + ": accepted"); s.close(); mss.close(); } catch (IOException e)
626627628629630631632633634635636
MasterServerSocket serverSocket2 = new MasterServerSocket(nextBindPort); serverSocket2.setSoTimeout(2000); try { virtualSocket3 = serverSocket2.accept(); fail(); } catch (SocketTimeoutException e) { if (e.getMessage().equals("Accept timed out"))
640641642643644645646647648649650
} assertTrue(virtualSocket3 == null); os.write(5); serverSocket2.setSoTimeout(20000); virtualSocket4 = serverSocket2.accept(); assertTrue(virtualSocket4.getSoTimeout() == 0); virtualSocket4.close(); serverSocket2.close(); } catch (Exception e)
140141142143144145146147148149150
public void run() { try { MasterServerSocket ss = new MasterServerSocket(5343); VirtualSocket s = (VirtualSocket) ss.accept(); Thread.sleep(2000); s.getMultiplexingManager().getSocket().close(); s.close(); ss.close(); }