Home
last modified time | relevance | path

Searched refs:socket (Results 1 – 25 of 37) sorted by relevance

12

/cts/tests/location/location_gnss/src/android/location/cts/gnss/suplClient/
DSuplTcpClient.java38 private Socket socket; field in SuplTcpClient
44 socket = new Socket(suplServerName, suplServerPort); in SuplTcpClient()
45 socket.setSoTimeout(READ_TIMEOUT_MILLIS); in SuplTcpClient()
46 System.out.println("Connection established to " + socket.getOutputStream()); in SuplTcpClient()
47 bufferedInputStream = new BufferedInputStream(socket.getInputStream()); in SuplTcpClient()
53 socket.getOutputStream().write(data); in sendSuplRequest()
76 socket.close(); in closeSocket()
/cts/tests/tests/companion/multidevice/client/src/android/companion/cts/multidevice/
DBluetoothConnector.kt48 val socket = device.createRfcommSocketToServiceRecord(SERVICE_UUID) in attachClientSocket() constant
51 clientSockets[associationId] = socket in attachClientSocket()
53 clientSockets += associationId to socket in attachClientSocket()
56 socket.connect() in attachClientSocket()
57 Log.d(TAG, "Attaching client socket $socket.") in attachClientSocket()
60 socket.inputStream, in attachClientSocket()
61 socket.outputStream in attachClientSocket()
131 val socket = mServerSocket.accept() in run() constant
132 Log.d(TAG, "Attaching server socket $socket.") in run()
135 socket.inputStream, in run()
[all …]
/cts/apps/CtsVerifier/src/com/android/cts/verifier/bluetooth/
DBluetoothChatService.java222 public synchronized void connected(@NonNull BluetoothSocket socket, BluetoothDevice in connected() argument
226 + ", MaxReceivePacketSize: " + socket.getMaxReceivePacketSize() in connected()
227 + ", MaxTransmitPacketSize: " + socket.getMaxTransmitPacketSize()); in connected()
230 + socket.getMaxReceivePacketSize(), socket.getMaxReceivePacketSize() >= 0); in connected()
232 + socket.getMaxTransmitPacketSize(), socket.getMaxTransmitPacketSize() >= 0); in connected()
251 mConnectedThread = new ConnectedThread(socket, socketType); in connected()
381 BluetoothSocket socket = null; in run() local
388 socket = mmServerSocket.accept(); in run()
395 if (socket != null) { in run()
401 mSocketConnectionType = socket.getConnectionType(); in run()
[all …]
/cts/hostsidetests/devicepolicy/app/DeviceAndProfileOwner/src/com/android/cts/deviceandprofileowner/vpn/
DVpnTestHelper.java184 FileDescriptor socket = Os.socket(AF_INET, SOCK_DGRAM, IPPROTO_ICMP); in checkPing() local
193 Os.connect(socket, InetAddress.getByName(host), port); in checkPing()
194 Os.write(socket, echo, 0, echo.length); in checkPing()
199 pollfd.fd = socket; in checkPing()
204 int read = Os.read(socket, reply, 0, echo.length); in checkPing()
214 InetSocketAddress local = (InetSocketAddress) Os.getsockname(socket); in checkPing()
228 Os.close(socket); in checkPing()
232 FileDescriptor socket = null; in tryPosixConnect() local
234 socket = Os.socket(AF_INET, SOCK_DGRAM, IPPROTO_ICMP); in tryPosixConnect()
236 Os.connect(socket, InetAddress.getByName(host), port); in tryPosixConnect()
[all …]
/cts/hostsidetests/appsecurity/test-apps/AppWithData/src/com/android/cts/appwithdata/
DMyProvider.java132 final Socket socket = server.accept(); in run() local
133 socket.setTcpNoDelay(true); in run()
134 final int val = socket.getInputStream().read(); in run()
135 socket.getOutputStream().write(val); in run()
136 socket.getOutputStream().flush(); in run()
137 socket.close(); in run()
/cts/tests/net/src/android/net/cts/
DLocalSocketTest.java151 LocalSocket socket = new LocalSocket(); in testAccessors() local
154 assertFalse(socket.isBound()); in testAccessors()
155 socket.bind(addr); in testAccessors()
156 assertTrue(socket.isBound()); in testAccessors()
157 assertEquals(addr, socket.getLocalSocketAddress()); in testAccessors()
159 String str = socket.toString(); in testAccessors()
162 socket.setReceiveBufferSize(1999); in testAccessors()
163 assertEquals(1999 << 1, socket.getReceiveBufferSize()); in testAccessors()
165 socket.setSendBufferSize(3998); in testAccessors()
166 assertEquals(3998 << 1, socket.getSendBufferSize()); in testAccessors()
[all …]
/cts/hostsidetests/appsecurity/test-apps/AppAccessData/src/com/android/cts/appaccessdata/
DAccessPrivateDataTest.java186 final Socket socket = new Socket(); in testTrafficStatsStatsUidSelf() local
187 socket.setTcpNoDelay(true); in testTrafficStatsStatsUidSelf()
190 extras.putParcelable("fd", ParcelFileDescriptor.fromSocket(socket)); in testTrafficStatsStatsUidSelf()
193 socket.connect(new InetSocketAddress("localhost", port)); in testTrafficStatsStatsUidSelf()
195 socket.getOutputStream().write(42); in testTrafficStatsStatsUidSelf()
196 socket.getOutputStream().flush(); in testTrafficStatsStatsUidSelf()
197 final int val = socket.getInputStream().read(); in testTrafficStatsStatsUidSelf()
199 socket.close(); in testTrafficStatsStatsUidSelf()
/cts/hostsidetests/appsecurity/test-apps/UseProcessSuccess/src/com/android/cts/useprocess/
DBaseNetworkService.java104 Socket socket = new Socket("example.com", 80);
105 socket.close();
172 Socket socket = new Socket("localhost", server.getLocalPort());
173 OutputStream out = socket.getOutputStream();
180 socket.close();
190 Socket socket = server.accept();
191 InputStream in = socket.getInputStream();
/cts/tests/tests/companion/PermissionsSyncTestApp/src/android/os/cts/companiontestapp/
DMainActivity.java197 final BluetoothSocket socket = mClientDevice in startPermissionsSync() local
199 socket.connect(); in startPermissionsSync()
200 Log.v(TAG, "Attaching client socket " + socket); in startPermissionsSync()
203 socket.getInputStream(), in startPermissionsSync()
204 socket.getOutputStream()); in startPermissionsSync()
310 final BluetoothSocket socket = mServerSocket.accept(); in run() local
311 Log.v(TAG, "Attaching server socket " + socket); in run()
314 socket.getInputStream(), in run()
315 socket.getOutputStream()); in run()
/cts/hostsidetests/theme/
Davd.py20 import socket
29 s = socket.socket()
/cts/tests/tests/time/src/android/app/time/cts/
DSntpTestServer.java97 DatagramSocket socket; in makeSocket() local
99 socket = new DatagramSocket(0, InetAddress.getLoopbackAddress()); in makeSocket()
104 return socket; in makeSocket()
/cts/tests/tests/selinux/common/jni/
Dandroid_security_SELinuxTargetSdkTest.cpp43 int sock = socket(AF_NETLINK, SOCK_RAW, NETLINK_ROUTE); in checkNetlinkRouteGetlink()
76 int sock = socket(AF_NETLINK, SOCK_RAW, NETLINK_ROUTE); in checkNetlinkRouteGetneigh()
119 int sock = socket(AF_NETLINK, SOCK_RAW, NETLINK_ROUTE); in checkNetlinkRouteBind()
/cts/tests/tests/os/assets/minijail/
Disolated-common-not-i386.policy33 # socket: domain==AF_UNIX && protocol == 0
34 socket: arg0 == 1 && arg2 == 0
/cts/apps/CtsVerifier/assets/scripts/
Dexecute_power_tests.py23 import socket
193 dummysocket = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
210 link = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
216 except socket.error as serr:
776 except socket.error:
/cts/hostsidetests/securitybulletin/securityPatch/CVE-2016-10229/
Dpoc.c33 s = socket(AF_INET6, SOCK_DGRAM, IPPROTO_IP); in udp_send()
53 s = socket(AF_INET6, SOCK_DGRAM, IPPROTO_IP); in udp_recv()
/cts/tests/tests/media/misc/src/android/media/misc/cts/
DNativeDecoderTest.java231 Socket socket, int buffersize, HttpParams params) throws IOException { in createHttpDataTransmitter() argument
232 return createSessionOutputBuffer(socket, buffersize, params); in createHttpDataTransmitter()
236 Socket socket, int buffersize, HttpParams params) throws IOException { in createSessionOutputBuffer() argument
237 return new SocketOutputBuffer(socket, buffersize, params) { in createSessionOutputBuffer()
/cts/tests/tests/media/player/src/android/media/player/cts/
DMediaPlayerFlakyNetworkTest.java307 Socket socket, int buffersize, HttpParams params) throws IOException { in createHttpDataTransmitter() argument
308 return createSessionOutputBuffer(socket, buffersize, params); in createHttpDataTransmitter()
312 Socket socket, int buffersize, HttpParams params) throws IOException { in createSessionOutputBuffer() argument
313 return new SocketOutputBuffer(socket, buffersize, params) { in createSessionOutputBuffer()
/cts/tests/tests/net/native/src/
DTagSocketTest.cpp91 int sock = socket(AF_INET6, SOCK_STREAM | SOCK_CLOEXEC, 0); in TEST_F()
115 int sock = socket(AF_INET6, SOCK_STREAM | SOCK_CLOEXEC, 0); in TEST_F()
/cts/apps/CtsVerifier/src/com/android/cts/verifier/wifiaware/testcase/
DDataPathInBandTestCase.java302 Socket socket = info.first.getSocketFactory().createSocket(peerIpv6, peerPort); in executeTestSubscriber() local
306 OutputStream os = socket.getOutputStream(); in executeTestSubscriber()
312 InputStream is = socket.getInputStream(); in executeTestSubscriber()
376 Socket socket = server.accept(); in executeTestPublisher()
378 InputStream is = socket.getInputStream(); in executeTestPublisher()
405 OutputStream os = socket.getOutputStream(); in executeTestPublisher()
/cts/hostsidetests/cpptools/test-apps/ConnectorNativeProgram/
Dconnector.cpp46 if ((fd = socket(AF_UNIX, SOCK_STREAM | SOCK_CLOEXEC, 0)) == -1) { in main()
/cts/hostsidetests/securitybulletin/securityPatch/CVE-2016-0844/
Dpoc.c72 if ((sockfd = socket(AF_INET, SOCK_DGRAM, 0)) < 0) { in main()
/cts/hostsidetests/appsecurity/test-apps/ListeningPortsApp/src/android/appsecurity/cts/listeningports/
DListeningPortsTest.java199 Socket socket = new Socket(); in isTcpConnectable() local
205 socket.connect(new InetSocketAddress(address, port), CONN_TIMEOUT_IN_MS); in isTcpConnectable()
213 socket.close(); in isTcpConnectable()
/cts/hostsidetests/securitybulletin/securityPatch/CVE-2017-13273/
Dpoc.c75 sock_fd = socket(AF_INET, SOCK_STREAM, 0); in main()
/cts/libs/testserver/src/android/webkit/cts/
DCtsTestServer.java1181 Socket socket = mSocket.accept(); in run() local
1184 mSockets.add(socket); in run()
1190 conn.bind(socket, params); in run()
1200 mExecutorService.execute(new HandleResponseTask(conn, request, socket)); in run()
1231 for (Socket socket : mSockets) { in shutDownOnClientThread()
1232 socket.close(); in shutDownOnClientThread()
1251 HttpRequest request, Socket socket) { in HandleResponseTask() argument
1254 this.mSocket = socket; in HandleResponseTask()
/cts/apps/CtsVerifier/src/com/android/cts/verifier/security/
DKeyChainTest.java423 public String chooseClientAlias(String[] keyTypes, Principal[] issuers, Socket socket) { in chooseClientAlias() argument
428 socket.getInetAddress().getHostName(), socket.getPort(), in chooseClientAlias()
442 Socket socket) { in chooseServerAlias() argument

12