Home
last modified time | relevance | path

Searched refs:serverSocket (Results 1 – 7 of 7) sorted by relevance

/cts/tests/tests/net/src/android/net/cts/
DLocalSocketTest.java54 LocalSocket serverSocket = localServerSocket.accept(); in testLocalConnections() local
55 assertTrue(serverSocket.isConnected()); in testLocalConnections()
56 assertTrue(serverSocket.isBound()); in testLocalConnections()
58 serverSocket.bind(localServerSocket.getLocalSocketAddress()); in testLocalConnections()
63 serverSocket.connect(locSockAddr); in testLocalConnections()
74 InputStream serverInStream = serverSocket.getInputStream(); in testLocalConnections()
78 OutputStream serverOutStream = serverSocket.getOutputStream(); in testLocalConnections()
88 FileDescriptor[] out = serverSocket.getAncillaryFileDescriptors(); in testLocalConnections()
107 serverSocket.shutdownInput(); in testLocalConnections()
111 serverSocket.shutdownOutput(); in testLocalConnections()
[all …]
DLocalServerSocketTest.java39 LocalSocket serverSocket = localServerSocket.accept(); in testLocalServerSocket() local
41 assertTrue(serverSocket.isConnected()); in testLocalServerSocket()
42 assertTrue(serverSocket.isBound()); in testLocalServerSocket()
47 InputStream serverInStream = serverSocket.getInputStream(); in testLocalServerSocket()
51 OutputStream serverOutStream = serverSocket.getOutputStream(); in testLocalServerSocket()
DIpSecBaseTest.java377 ServerSocket serverSocket = new ServerSocket(); in getJavaTcpSocketPair() local
378 serverSocket.bind(new InetSocketAddress(localAddr, 0)); in getJavaTcpSocketPair()
387 FileDescriptor serverFd = serverSocket.getImpl().getFD$(); in getJavaTcpSocketPair()
392 clientSock.mSocket.connect(new InetSocketAddress(localAddr, serverSocket.getLocalPort())); in getJavaTcpSocketPair()
393 JavaTcpSocket acceptedSock = new JavaTcpSocket(serverSocket.accept()); in getJavaTcpSocketPair()
396 serverSocket.close(); in getJavaTcpSocketPair()
/cts/tests/tests/networksecurityconfig/networksecurityconfig-downloadmanager/src/android/security/net/config/cts/
DDownloadManagerTest.java69 SSLServerSocket serverSocket = bindTLSServer(R.raw.valid_chain, R.raw.test_key); in testConfigTrustedCaAccepted() local
70 runDownloadManagerTest(serverSocket, true); in testConfigTrustedCaAccepted()
75 SSLServerSocket serverSocket = bindTLSServer(R.raw.invalid_chain, R.raw.test_key); in testUntrustedCaRejected() local
76 runDownloadManagerTest(serverSocket, true); in testUntrustedCaRejected()
83 ServerSocket serverSocket = new ServerSocket(); in testPerDomainCleartextAccepted() local
84 serverSocket.bind(null); in testPerDomainCleartextAccepted()
85 runDownloadManagerTest(serverSocket, false); in testPerDomainCleartextAccepted()
88 private void runDownloadManagerTest(ServerSocket serverSocket, boolean https) throws Exception { in runDownloadManagerTest() argument
95 runServer(serverSocket); in runDownloadManagerTest()
104 Uri destination = Uri.parse(host + ":" + serverSocket.getLocalPort()); in runDownloadManagerTest()
[all …]
/cts/hostsidetests/devicepolicy/app/DeviceOwner/src/com/android/cts/deviceowner/
DNetworkLoggingTest.java282 final ServerSocket serverSocket = new ServerSocket(0); in generateDummyTraffic() local
283 final Thread serverThread = startDummyServer(serverSocket); in generateDummyTraffic()
285 final int reqNo = makeDummyRequests(serverSocket.getLocalPort()); in generateDummyTraffic()
287 serverSocket.close(); in generateDummyTraffic()
308 private Thread startDummyServer(ServerSocket serverSocket) throws InterruptedException { in startDummyServer() argument
310 while (!serverSocket.isClosed()) { in startDummyServer()
312 final Socket socket = serverSocket.accept(); in startDummyServer()
328 if (!serverSocket.isClosed()) { in startDummyServer()
/cts/apps/CtsVerifier/src/com/android/cts/verifier/sensors/helpers/
DPowerTestHostLink.java109 LocalServerSocket serverSocket = createSocket(); in run() local
110 if (null == serverSocket) { in run()
121 receiverSocket = serverSocket.accept(); in run()
183 if (serverSocket != null) { in run()
185 serverSocket.close(); in run()
/cts/tests/tests/keystore/src/android/keystore/cts/
DKeyPairGeneratorTest.java1417 SSLServerSocket serverSocket = (SSLServerSocket) serverContext.getServerSocketFactory() in assertSSLConnectionWithClientAuth() local
1420 int port = serverSocket.getLocalPort(); in assertSSLConnectionWithClientAuth()
1423 final SSLSocket server = (SSLSocket) serverSocket.accept(); in assertSSLConnectionWithClientAuth()