Home
last modified time | relevance | path

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

123

/cts/tests/tests/net/src/android/net/cts/
DSSLCertificateSocketFactoryTest.java134 Socket socket = new Socket(); in createSocket_io_error_expected() local
135 mSocketFactory.createSocket(socket, "localhost", HTTPS_PORT, true); in createSocket_io_error_expected()
174 Socket socket = mSocketFactory.createSocket(TEST_HOST, HTTPS_PORT); in createSocket_simple_with_hostname_verification() local
175 assertConnectedSocket(socket); in createSocket_simple_with_hostname_verification()
176 socket.close(); in createSocket_simple_with_hostname_verification()
202 Socket socket = mSocketFactory.createSocket(underlying, TEST_HOST, HTTPS_PORT, true); in createSocket_wrapped_with_hostname_verification() local
203 assertConnectedSocket(socket); in createSocket_wrapped_with_hostname_verification()
204 socket.close(); in createSocket_wrapped_with_hostname_verification()
231 Socket socket = mSocketFactory.createSocket(TEST_HOST, HTTPS_PORT, mLocalAddress, 0); in createSocket_bound_with_hostname_verification() local
232 assertConnectedSocket(socket); in createSocket_bound_with_hostname_verification()
[all …]
DVpnServiceTest.java67 DatagramSocket socket = new DatagramSocket(); in testProtect_DatagramSocket() local
70 assertFalse(mVpnService.protect(socket)); in testProtect_DatagramSocket()
73 socket.close(); in testProtect_DatagramSocket()
81 Socket socket = new Socket(); in testProtect_Socket() local
84 assertFalse(mVpnService.protect(socket)); in testProtect_Socket()
87 socket.close(); in testProtect_Socket()
96 DatagramSocket socket = new DatagramSocket(); in testProtect_int() local
97 ParcelFileDescriptor descriptor = ParcelFileDescriptor.fromDatagramSocket(socket); in testProtect_int()
108 socket.close(); in testProtect_int()
DLocalSocketTest.java140 LocalSocket socket = new LocalSocket(); in testAccessors() local
143 assertFalse(socket.isBound()); in testAccessors()
144 socket.bind(addr); in testAccessors()
145 assertTrue(socket.isBound()); in testAccessors()
146 assertEquals(addr, socket.getLocalSocketAddress()); in testAccessors()
148 String str = socket.toString(); in testAccessors()
151 socket.setReceiveBufferSize(1999); in testAccessors()
152 assertEquals(1999 << 1, socket.getReceiveBufferSize()); in testAccessors()
154 socket.setSendBufferSize(3998); in testAccessors()
155 assertEquals(3998 << 1, socket.getSendBufferSize()); in testAccessors()
[all …]
DIpSecManagerTunnelTest.java270 JavaUdpSocket socket = new JavaUdpSocket(localInner); in getIpSecTunnelTestRunnable()
271 ipsecNetwork.bindSocket(socket.mSocket); in getIpSecTunnelTestRunnable()
272 int innerSocketPort = socket.getPort(); in getIpSecTunnelTestRunnable()
277 socket.mSocket, IpSecManager.DIRECTION_IN, inTransportTransform); in getIpSecTunnelTestRunnable()
279 socket.mSocket, IpSecManager.DIRECTION_OUT, outTransportTransform); in getIpSecTunnelTestRunnable()
282 socket.sendTo(TEST_DATA, remoteInner, socket.getPort()); in getIpSecTunnelTestRunnable()
290 socket.close(); in getIpSecTunnelTestRunnable()
317 JavaUdpSocket socket = new JavaUdpSocket(localInner, innerSocketPort);
318 ipsecNetwork.bindSocket(socket.mSocket);
323 socket.mSocket, IpSecManager.DIRECTION_IN, outTransportTransform);
[all …]
DTrafficStatsTest.java123 final Socket socket = new Socket("localhost", server.getLocalPort()); in testTrafficStatsForLocalhost() local
126 socket.setTcpNoDelay(true); in testTrafficStatsForLocalhost()
127 final OutputStream out = socket.getOutputStream(); in testTrafficStatsForLocalhost()
130 TrafficStats.tagSocket(socket); in testTrafficStatsForLocalhost()
142 socket.close(); in testTrafficStatsForLocalhost()
151 final Socket socket = server.accept(); in testTrafficStatsForLocalhost() local
152 socket.setTcpNoDelay(true); in testTrafficStatsForLocalhost()
154 TrafficStats.tagSocket(socket); in testTrafficStatsForLocalhost()
155 final InputStream in = socket.getInputStream(); in testTrafficStatsForLocalhost()
DIpSecBaseTest.java275 public JavaTcpSocket(Socket socket) { in JavaTcpSocket() argument
276 mSocket = socket; in JavaTcpSocket()
331 IpSecManager ism, IpSecTransform transform, GenericSocket socket) throws Exception { in applyTransformBidirectionally() argument
333 socket.applyTransportModeTransform(ism, direction, transform); in applyTransformBidirectionally()
343 Os.socket(domain, OsConstants.SOCK_DGRAM, OsConstants.IPPROTO_UDP)); in getNativeUdpSocketPair()
345 Os.socket(domain, OsConstants.SOCK_DGRAM, OsConstants.IPPROTO_UDP)); in getNativeUdpSocketPair()
365 Os.socket(domain, OsConstants.SOCK_STREAM, OsConstants.IPPROTO_TCP)); in getNativeTcpSocketPair()
367 Os.socket(domain, OsConstants.SOCK_STREAM, OsConstants.IPPROTO_TCP)); in getNativeTcpSocketPair()
/cts/suite/audio_quality/lib/include/audio/
DAudioProtocol.h79 static bool handleReplyHeader(ClientSocket& socket, uint32_t* data, CommandId& id);
82 AudioProtocol(ClientSocket& socket, uint32_t command) in AudioProtocol() argument
84 mSocket(socket) {}; in AudioProtocol()
105 explicit CmdDownload(ClientSocket& socket) in CmdDownload() argument
106 : AudioProtocol(socket, ECmdDownload) {}; in CmdDownload()
114 explicit CmdStartPlayback(ClientSocket& socket) in CmdStartPlayback() argument
115 : AudioProtocol(socket, ECmdStartPlayback) {}; in CmdStartPlayback()
122 explicit CmdStopPlayback(ClientSocket& socket) in CmdStopPlayback() argument
123 : AudioProtocol(socket, ECmdStopPlayback) {}; in CmdStopPlayback()
129 explicit CmdStartRecording(ClientSocket& socket) in CmdStartRecording() argument
[all …]
/cts/tests/tests/location/src/android/location/cts/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/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/tests/tests/netpermission/updatestatspermission/src/android/net/cts/network/permission/
DUpdateStatsPermissionTest.java55 Socket socket = new Socket("example.com", 80); in testUpdateDeviceStatsPermission() local
56 TrafficStats.tagSocket(socket); in testUpdateDeviceStatsPermission()
62 socket.setTcpNoDelay(true); in testUpdateDeviceStatsPermission()
63 socket.setSoLinger(true, 0); in testUpdateDeviceStatsPermission()
64 OutputStream out = socket.getOutputStream(); in testUpdateDeviceStatsPermission()
69 socket.close(); in testUpdateDeviceStatsPermission()
/cts/hostsidetests/appsecurity/test-apps/AppAccessData/src/com/android/cts/appaccessdata/
DAccessPrivateDataTest.java167 final Socket socket = new Socket(); in testTrafficStatsStatsUidSelf() local
168 socket.setTcpNoDelay(true); in testTrafficStatsStatsUidSelf()
171 extras.putParcelable("fd", ParcelFileDescriptor.fromSocket(socket)); in testTrafficStatsStatsUidSelf()
174 socket.connect(new InetSocketAddress("localhost", port)); in testTrafficStatsStatsUidSelf()
176 socket.getOutputStream().write(42); in testTrafficStatsStatsUidSelf()
177 socket.getOutputStream().flush(); in testTrafficStatsStatsUidSelf()
178 final int val = socket.getInputStream().read(); in testTrafficStatsStatsUidSelf()
180 socket.close(); in testTrafficStatsStatsUidSelf()
/cts/apps/CtsVerifier/src/com/android/cts/verifier/bluetooth/
DBluetoothChatService.java219 public synchronized void connected(BluetoothSocket socket, BluetoothDevice in connected() argument
240 mConnectedThread = new ConnectedThread(socket, socketType); in connected()
370 BluetoothSocket socket = null; in run() local
377 socket = mmServerSocket.accept(); in run()
384 if (socket != null) { in run()
390 mSocketConnectionType = socket.getConnectionType(); in run()
391 connected(socket, socket.getRemoteDevice(), in run()
398 socket.close(); in run()
531 public ConnectedThread(BluetoothSocket socket, String socketType) { in ConnectedThread() argument
533 mmSocket = socket; in ConnectedThread()
[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/suite/audio_quality/test_description/
Dprocessing_main.py20 import socket
208 s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
209 s.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1)
/cts/tests/tests/net/src/android/net/rtp/cts/
DAudioGroupTest.java84 private void assertPacket(DatagramSocket socket, int length) throws Exception { in assertPacket() argument
86 socket.setSoTimeout(3000); in assertPacket()
87 socket.receive(packet); in assertPacket()
91 private void drain(DatagramSocket socket) throws Exception { in drain() argument
93 socket.setSoTimeout(1); in drain()
98 socket.receive(packet); in drain()
/cts/suite/audio_quality/lib/src/audio/
DRemoteAudio.cpp29 RemoteAudio::RemoteAudio(ClientSocket& socket) in RemoteAudio() argument
31 mSocket(socket), in RemoteAudio()
38 mCmds[AudioProtocol::ECmdDownload - AudioProtocol::ECmdStart] = new CmdDownload(socket); in RemoteAudio()
40 new CmdStartPlayback(socket); in RemoteAudio()
42 new CmdStopPlayback(socket); in RemoteAudio()
44 new CmdStartRecording(socket); in RemoteAudio()
46 new CmdStopRecording(socket); in RemoteAudio()
48 new CmdGetDeviceInfo(socket); in RemoteAudio()
/cts/hostsidetests/theme/
Davd.py20 import socket
29 s = socket.socket()
/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/apps/CameraITS/pymodules/its/
Ddevice.py17 import socket
120 socket_lock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
125 except socket.error or socket.timeout:
182 self.sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
/cts/hostsidetests/devicepolicy/app/ManagedProfile/src/com/android/cts/managedprofile/
DBluetoothTest.java85 BluetoothServerSocket socket = mAdapter.listenUsingRfcommWithServiceRecord( in testListenUsingRfcommWithServiceRecord() local
87 assertNotNull(socket); in testListenUsingRfcommWithServiceRecord()
88 socket.close(); in testListenUsingRfcommWithServiceRecord()
/cts/tests/tests/net/native/qtaguid/src/
DNativeQtaguidTest.cpp76 int sockfd = socket(family, SOCK_STREAM, 0); in checkNoSocketPointerLeaks()
93 int sockfd = socket(AF_INET, SOCK_STREAM, 0); in TEST()
108 int sockfd = socket(AF_INET6, SOCK_STREAM, 0); in TEST()
/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/src/com/android/cts/verifier/wifiaware/testcase/
DDataPathInBandTestCase.java242 Socket socket = info.first.getSocketFactory().createSocket(peerIpv6, peerPort); in executeTestSubscriber() local
246 OutputStream os = socket.getOutputStream(); in executeTestSubscriber()
252 InputStream is = socket.getInputStream(); in executeTestSubscriber()
315 Socket socket = server.accept(); in executeTestPublisher()
317 InputStream is = socket.getInputStream(); in executeTestPublisher()
344 OutputStream os = socket.getOutputStream(); in executeTestPublisher()
/cts/tests/tests/media/src/android/media/cts/
DMediaPlayerFlakyNetworkTest.java289 Socket socket, int buffersize, HttpParams params) throws IOException { in createHttpDataTransmitter() argument
290 return createSessionOutputBuffer(socket, buffersize, params); in createHttpDataTransmitter()
294 Socket socket, int buffersize, HttpParams params) throws IOException { in createSessionOutputBuffer() argument
295 return new SocketOutputBuffer(socket, buffersize, params) { in createSessionOutputBuffer()
/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()

123