/libcore/luni/src/test/java/libcore/javax/net/ |
D | ServerSocketFactoryTest.java | 35 ServerSocket serverSocket = ServerSocketFactory.getDefault().createServerSocket(); in testCreateServerSocket() local 36 serverSocket.bind(new InetSocketAddress(0)); in testCreateServerSocket() 37 testSocket(serverSocket, 50); in testCreateServerSocket() 41 ServerSocket serverSocket = ServerSocketFactory.getDefault().createServerSocket(0); in testCreateServerSocketWithPort() local 42 testSocket(serverSocket, 50); in testCreateServerSocketWithPort() 50 ServerSocket serverSocket = ServerSocketFactory.getDefault().createServerSocket(0, 1); in testCreateServerSocketWithPortNoBacklog() local 51 testSocket(serverSocket, 1); in testCreateServerSocketWithPortNoBacklog() 55 ServerSocket serverSocket = ServerSocketFactory.getDefault().createServerSocket(0, 0); in testCreateServerSocketWithPortZeroBacklog() local 56 testSocket(serverSocket, 50); in testCreateServerSocketWithPortZeroBacklog() 60 ServerSocket serverSocket = ServerSocketFactory.getDefault().createServerSocket(0, 50); in testCreateServerSocketWithPortAndBacklog() local [all …]
|
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/net/ |
D | ServerSocketTest.java | 638 ServerSocket serverSocket = new ServerSocket(); in test_isBound() local 640 serverSocket.isBound()); in test_isBound() 643 serverSocket.bind(new InetSocketAddress(addr, 0)); in test_isBound() 645 serverSocket.isBound()); in test_isBound() 646 serverSocket.close(); in test_isBound() 649 serverSocket = new ServerSocket(0); in test_isBound() 651 serverSocket.isBound()); in test_isBound() 652 serverSocket.close(); in test_isBound() 654 serverSocket = new ServerSocket(0, 5, addr); in test_isBound() 656 serverSocket.isBound()); in test_isBound() [all …]
|
D | TestServerSocketInit.java | 26 ServerSocket serverSocket = new ServerSocket(); in main() local 27 serverSocket.setReuseAddress(true); in main() 28 serverSocket.close(); in main()
|
D | DatagramSocketTest.java | 54 final DatagramSocket serverSocket; field in DatagramSocketTest.DatagramServer 62 serverSocket = new DatagramSocket(0, address); in DatagramServer() 63 serverSocket.setSoTimeout(2000); in DatagramServer() 74 serverSocket.receive(rdp); in run() 76 serverSocket.send(rdp); in run() 87 return serverSocket.getLocalPort(); in getPort() 96 serverSocket.close(); in close()
|
/libcore/ojluni/src/main/java/sun/net/ |
D | NetworkClient.java | 51 protected Socket serverSocket = null; field in NetworkClient 134 if (serverSocket != null) in openServer() 136 serverSocket = doConnect (server, port); in openServer() 139 serverSocket.getOutputStream()), in openServer() 144 serverInput = new BufferedInputStream(serverSocket.getInputStream()); in openServer() 201 if (serverSocket == null) in getLocalAddress() 206 return serverSocket.getLocalAddress(); in getLocalAddress() 217 serverSocket.close(); 218 serverSocket = null; 225 return serverSocket != null; [all …]
|
/libcore/luni/src/test/java/libcore/java/net/ |
D | ServerSocketConcurrentCloseTest.java | 60 final ExposedServerSocket serverSocket = new ExposedServerSocket(); in testImplAccept_detectsClosedState() local 61 serverSocket.close(); in testImplAccept_detectsClosedState() 70 serverSocket.implAcceptExposedForTest(socket); in testImplAccept_detectsClosedState() 134 ServerSocket serverSocket; in checkConnectIterationAndCloseSocket() local 136 serverSocket = new ServerSocket(0 /* allocate port number automatically */); in checkConnectIterationAndCloseSocket() 141 ServerRunnable serverRunnable = new ServerRunnable(serverSocket); in checkConnectIterationAndCloseSocket() 144 serverSocket.getLocalSocketAddress(), serverRunnable); in checkConnectIterationAndCloseSocket() 157 serverSocket.close(); in checkConnectIterationAndCloseSocket() 222 private final ServerSocket serverSocket; field in ServerSocketConcurrentCloseTest.ServerRunnable 227 ServerRunnable(ServerSocket serverSocket) { in ServerRunnable() argument [all …]
|
D | OldSocketTest.java | 597 ServerSocket serverSocket = new ServerSocket(0, 5, addr); in test_shutdownInput() local 598 Socket theSocket = new Socket(addr, serverSocket.getLocalPort()); in test_shutdownInput() 599 Socket servSock = serverSocket.accept(); in test_shutdownInput() 619 serverSocket.close(); in test_shutdownInput() 632 ServerSocket serverSocket = new ServerSocket(0, 5); in test_shutdownOutput() local 633 Socket theSocket = new Socket(serverSocket.getInetAddress(), serverSocket.getLocalPort()); in test_shutdownOutput() 634 Socket servSock = serverSocket.accept(); in test_shutdownOutput() 652 serverSocket.close(); in test_shutdownOutput() 735 ServerSocket serverSocket = new ServerSocket(0, 5); in test_isBound() local 736 Socket theSocket = new Socket(serverSocket.getInetAddress(), serverSocket.getLocalPort()); in test_isBound() [all …]
|
D | SocketTimeoutTest.java | 109 ServerSocket serverSocket = new ServerSocket(0)) { in testSocketWriteNeverTimeouts() 115 serverSocket.setReceiveBufferSize(1); in testSocketWriteNeverTimeouts() 116 int actualSize = sock.getSendBufferSize() + serverSocket.getReceiveBufferSize(); in testSocketWriteNeverTimeouts() 118 sock.connect(serverSocket.getLocalSocketAddress()); in testSocketWriteNeverTimeouts()
|
D | SocketTest.java | 324 final ServerSocket serverSocket = new ServerSocket(0); in assertAvailableReturnsZeroAfterSocketReadsAllData() local 329 Socket socket = serverSocket.accept(); in assertAvailableReturnsZeroAfterSocketReadsAllData() 338 Socket socket = new Socket("localhost", serverSocket.getLocalPort()); in assertAvailableReturnsZeroAfterSocketReadsAllData() 349 serverSocket.close(); in assertAvailableReturnsZeroAfterSocketReadsAllData() 497 private ServerSocket serverSocket; field in SocketTest.MockServer 502 serverSocket = new ServerSocket(0); in MockServer() 503 serverSocket.setReuseAddress(true); in MockServer() 504 port = serverSocket.getLocalPort(); in MockServer() 511 Socket socket = serverSocket.accept(); in enqueue() 528 serverSocket.close(); in shutdown()
|
D | FtpURLConnectionTest.java | 372 Socket socket = serverSocket.accept(); in run() 387 private final ServerSocket serverSocket; field in FtpURLConnectionTest.CountingProxy 395 serverSocket = new ServerSocket(0 /* allocate port number automatically */); in CountingProxy() 396 SocketAddress socketAddress = serverSocket.getLocalSocketAddress(); in CountingProxy() 440 serverSocket.close(); in shutdown()
|
/libcore/luni/src/test/java/org/apache/harmony/luni/tests/internal/net/www/protocol/http/ |
D | HttpURLConnectionTest.java | 47 ServerSocket serverSocket; field in HttpURLConnectionTest.MockServer 53 serverSocket = new ServerSocket(0); in MockServer() 54 serverSocket.setSoTimeout(1000); in MockServer() 58 return serverSocket.getLocalPort(); in port() 69 serverSocket.accept().close(); in run() 73 serverSocket.close(); in run() 91 Socket socket = serverSocket.accept(); in run() 102 socket = serverSocket.accept(); in run()
|
/libcore/luni/src/test/java/libcore/libcore/io/ |
D | FdsanTest.java | 115 try (ServerSocket serverSocket = new ServerSocket(port, /* backlog */ 1)) { in testSocket() argument 116 assertFdOwnedBySocket(serverSocket.getFileDescriptor$()); in testSocket() 118 Socket client = new Socket(serverSocket.getInetAddress(), serverSocket.getLocalPort()); in testSocket() 119 Socket server = serverSocket.accept(); in testSocket()
|
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/javax/net/ssl/ |
D | HandshakeCompletedEventTest.java | 202 private SSLServerSocket serverSocket; field in HandshakeCompletedEventTest 410 … serverSocket = (SSLServerSocket) sslContext.getServerSocketFactory().createServerSocket(); in TestServer() 413 serverSocket.setWantClientAuth(true); in TestServer() 415 serverSocket.setNeedClientAuth(true); in TestServer() 417 serverSocket.setWantClientAuth(false); in TestServer() 420 serverSocket.bind(new InetSocketAddress(0)); in TestServer() 425 SSLSocket clientSocket = (SSLSocket)serverSocket.accept(); in run() 444 serverSocket.close(); in run() 493 socket.connect(serverSocket.getLocalSocketAddress()); in run()
|
D | SSLSessionTest.java | 59 assertEquals(((InetSocketAddress) serverSocket.getLocalSocketAddress()).getHostString(), in test_getPeerHost() 61 assertEquals(serverSocket.getLocalPort(), s.getPeerPort()); in test_getPeerHost() 437 SSLServerSocket serverSocket; field in SSLSessionTest 486 … serverSocket = (SSLServerSocket)sslContext.getServerSocketFactory().createServerSocket(); in TestServer() 489 serverSocket.setWantClientAuth(true); in TestServer() 491 serverSocket.setNeedClientAuth(true); in TestServer() 493 serverSocket.setWantClientAuth(false); in TestServer() 496 serverSocket.bind(null); in TestServer() 501 SSLSocket clientSocket = (SSLSocket)serverSocket.accept(); in run() 516 serverSocket.close(); in run() [all …]
|
/libcore/support/src/test/java/libcore/javax/net/ssl/ |
D | TestSSLContext.java | 98 public final SSLServerSocket serverSocket; field in TestSSLContext 213 SSLServerSocket serverSocket, in TestSSLContext() argument 226 this.serverSocket = serverSocket; in TestSSLContext() 233 serverSocket.close(); in close() 292 SSLServerSocket serverSocket = (SSLServerSocket) in create() local 295 int port = serverSocket.getLocalPort(); in create() 304 serverSocket, host, port); in create()
|
D | TestSSLSocketPair.java | 76 final SSLSocket server = (SSLSocket) context.serverSocket.accept(); in connect()
|
/libcore/ojluni/src/main/java/java/net/ |
D | SocketImpl.java | 50 ServerSocket serverSocket = null; field in SocketImpl 304 this.serverSocket = soc; in setServerSocket() 308 return serverSocket; in getServerSocket()
|
D | AbstractPlainSocketImpl.java | 132 if (serverSocket != null) in create() 133 serverSocket.setCreated(); in create() 430 if (serverSocket != null) in bind() 431 serverSocket.setBound(); in bind()
|
D | PlainSocketImpl.java | 131 if (serverSocket != null) { in socketCreate()
|
/libcore/ojluni/annotations/hiddenapi/java/net/ |
D | SocketImpl.java | 141 java.net.ServerSocket serverSocket; field in SocketImpl
|
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/nio/channels/ |
D | ServerSocketChannelTest.java | 412 Socket serverSocket = serverChannel.accept().socket(); in test_read_Blocking_RealData() local 413 InputStream in = serverSocket.getInputStream(); in test_read_Blocking_RealData() 451 Socket serverSocket = serverChannel.accept().socket(); in test_read_NonBlocking_RealData() local 452 InputStream in = serverSocket.getInputStream(); in test_read_NonBlocking_RealData()
|
/libcore/ojluni/src/main/java/sun/nio/ch/ |
D | AsynchronousServerSocketChannelImpl.java | 71 this.fd = Net.serverSocket(true); in AsynchronousServerSocketChannelImpl()
|
D | ServerSocketChannelImpl.java | 88 this.fd = Net.serverSocket(true); in ServerSocketChannelImpl()
|
D | Net.java | 423 static FileDescriptor serverSocket(boolean stream) {
|
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/util/ |
D | ScannerTest.java | 74 private Socket serverSocket; field in ScannerTest 885 serverSocket.close(); in test_next() 934 serverSocket.close(); in test_nextLPattern() 979 serverSocket.close(); in test_nextLString() 1024 serverSocket.close(); in test_nextBoolean() 2490 serverSocket.close(); in test_hasNext() 2561 serverSocket.close(); in test_hasNextLPattern() 2626 serverSocket.close(); in test_hasNextLString() 2661 serverSocket.close(); in test_hasNextBoolean() 5674 serverSocket = server.accept(); in setUp() [all …]
|