8283848586878889909192
} }; thread.start(); // Accept the connection. Socket peer = server.accept(); try { assertTrue(peer.isConnected()); thread.join(); SocketAddress peerAddress = peer.getRemoteSocketAddress(); assertTrue(peerAddress instanceof InetSocketAddress);
124125126127128129130131132133134
} }; thread.start(); // Wait for the connection, then shut down the input stream. Socket peerServer = server.accept(); try { thread.join(); assertNotNull(peerClient[0]); try { assertFalse(peerServer.isInputShutdown());
168169170171172173174175176177178
} }; thread.start(); // Wait for the connection, then shut down the output stream. Socket peerServer = server.accept(); try { thread.join(); assertNotNull(peerClient[0]); try { assertFalse(peerServer.isOutputShutdown());
217218219220221222223224225226227
} }; thread.start(); // Accept the connection. Socket peer = server.accept(); try { assertTrue(peer.isConnected()); assertEquals( server.getReceiveBufferSize(), peer.getReceiveBufferSize());