Home
last modified time | relevance | path

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

12

/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 CmdDownload(ClientSocket& socket) in CmdDownload() argument
106 : AudioProtocol(socket, ECmdDownload) {}; in CmdDownload()
114 CmdStartPlayback(ClientSocket& socket) in CmdStartPlayback() argument
115 : AudioProtocol(socket, ECmdStartPlayback) {}; in CmdStartPlayback()
122 CmdStopPlayback(ClientSocket& socket) in CmdStopPlayback() argument
123 : AudioProtocol(socket, ECmdStopPlayback) {}; in CmdStopPlayback()
129 CmdStartRecording(ClientSocket& socket) in CmdStartRecording() argument
[all …]
/cts/tests/tests/net/src/android/net/cts/
DVpnServiceTest.java64 DatagramSocket socket = new DatagramSocket(); in testProtect_DatagramSocket() local
67 assertFalse(mVpnService.protect(socket)); in testProtect_DatagramSocket()
70 socket.close(); in testProtect_DatagramSocket()
78 Socket socket = new Socket(); in testProtect_Socket() local
81 assertFalse(mVpnService.protect(socket)); in testProtect_Socket()
84 socket.close(); in testProtect_Socket()
92 DatagramSocket socket = new DatagramSocket(); in testProtect_int() local
93 ParcelFileDescriptor descriptor = ParcelFileDescriptor.fromDatagramSocket(socket); in testProtect_int()
104 socket.close(); in testProtect_int()
DLocalSocketTest.java121 LocalSocket socket = new LocalSocket(); in testAccessors() local
124 assertFalse(socket.isBound()); in testAccessors()
125 socket.bind(addr); in testAccessors()
126 assertTrue(socket.isBound()); in testAccessors()
127 assertEquals(addr, socket.getLocalSocketAddress()); in testAccessors()
129 String str = socket.toString(); in testAccessors()
132 socket.setReceiveBufferSize(1999); in testAccessors()
133 assertEquals(1999 << 1, socket.getReceiveBufferSize()); in testAccessors()
135 socket.setSendBufferSize(3998); in testAccessors()
136 assertEquals(3998 << 1, socket.getSendBufferSize()); in testAccessors()
[all …]
DSSLCertificateSocketFactoryTest.java76 Socket socket = new Socket(); in testCreateSocket() local
77 mFactory.createSocket(socket, host, port, true); in testCreateSocket()
82 Socket socket = null; in testCreateSocket() local
83 socket = mFactory.createSocket(host, port); in testCreateSocket()
84 assertNotNull(socket); in testCreateSocket()
85 assertNotNull(socket.getOutputStream()); in testCreateSocket()
86 assertNotNull(socket.getInputStream()); in testCreateSocket()
DTrafficStatsTest.java127 Socket socket = new Socket("localhost", server.getLocalPort()); in testTrafficStatsForLocalhost() local
130 socket.setTcpNoDelay(true); in testTrafficStatsForLocalhost()
131 OutputStream out = socket.getOutputStream(); in testTrafficStatsForLocalhost()
134 TrafficStats.tagSocket(socket); in testTrafficStatsForLocalhost()
147 socket.close(); in testTrafficStatsForLocalhost()
157 Socket socket = server.accept(); in testTrafficStatsForLocalhost() local
158 socket.setTcpNoDelay(true); in testTrafficStatsForLocalhost()
160 TrafficStats.tagSocket(socket); in testTrafficStatsForLocalhost()
161 InputStream in = socket.getInputStream(); in testTrafficStatsForLocalhost()
/cts/tests/tests/security/src/android/security/cts/
DOpenSSLEarlyCCSTest.java239 SSLSocket socket = (SSLSocket) sslContext.getSocketFactory().createSocket(); in clientConnectAndHandshake() local
240 setClientSocket(socket); in clientConnectAndHandshake()
243 socket.connect(serverAddress); in clientConnectAndHandshake()
244 Log.i(TAG, "Client connected to server from " + socket.getLocalSocketAddress()); in clientConnectAndHandshake()
246 socket.getOutputStream().write("client".getBytes()); in clientConnectAndHandshake()
247 socket.getOutputStream().flush(); in clientConnectAndHandshake()
249 int b = socket.getInputStream().read(); in clientConnectAndHandshake()
256 socket.close(); in clientConnectAndHandshake()
286 SSLSocket socket = null; in serverAcceptAndHandshake() local
290 socket = (SSLSocket) serverSocket.accept(); in serverAcceptAndHandshake()
[all …]
DOpenSSLHeartbleedTest.java242 SSLSocket socket = (SSLSocket) sslContext.getSocketFactory().createSocket(); in clientConnectAndHandshake() local
243 setClientSocket(socket); in clientConnectAndHandshake()
246 socket.connect(serverAddress); in clientConnectAndHandshake()
247 Log.i(TAG, "Client connected to server from " + socket.getLocalSocketAddress()); in clientConnectAndHandshake()
249 socket.getOutputStream().write("client".getBytes()); in clientConnectAndHandshake()
250 socket.getOutputStream().flush(); in clientConnectAndHandshake()
252 int b = socket.getInputStream().read(); in clientConnectAndHandshake()
258 socket.close(); in clientConnectAndHandshake()
288 SSLSocket socket = null; in serverAcceptAndHandshake() local
292 socket = (SSLSocket) serverSocket.accept(); in serverAcceptAndHandshake()
[all …]
DListeningPortsTest.java239 Socket socket = new Socket(); in isTcpConnectable() local
245 socket.connect(new InetSocketAddress(address, port), CONN_TIMEOUT_IN_MS); in isTcpConnectable()
253 socket.close(); in isTcpConnectable()
/cts/apps/CtsVerifier/src/com/android/cts/verifier/bluetooth/
DBluetoothChatService.java165 public synchronized void connected(BluetoothSocket socket, BluetoothDevice in connected() argument
186 mConnectedThread = new ConnectedThread(socket, socketType); in connected()
300 BluetoothSocket socket = null; in run() local
307 socket = mmServerSocket.accept(); in run()
314 if (socket != null) { in run()
320 connected(socket, socket.getRemoteDevice(), in run()
327 socket.close(); in run()
434 public ConnectedThread(BluetoothSocket socket, String socketType) { in ConnectedThread() argument
436 mmSocket = socket; in ConnectedThread()
442 tmpIn = socket.getInputStream(); in ConnectedThread()
[all …]
/cts/tests/tests/net/src/android/net/rtp/cts/
DAudioGroupTest.java77 private void assertPacket(DatagramSocket socket, int length) throws Exception { in assertPacket() argument
79 socket.setSoTimeout(3000); in assertPacket()
80 socket.receive(packet); in assertPacket()
84 private void drain(DatagramSocket socket) throws Exception { in drain() argument
86 socket.setSoTimeout(1); in drain()
91 socket.receive(packet); in drain()
/cts/hostsidetests/appsecurity/test-apps/AppWithData/src/com/android/cts/appwithdata/
DCreatePrivateDataTest.java205 Socket socket = new Socket("localhost", server.getLocalPort()); in createTrafficStatsWithTags() local
208 socket.setTcpNoDelay(true); in createTrafficStatsWithTags()
209 OutputStream out = socket.getOutputStream(); in createTrafficStatsWithTags()
213 TrafficStats.tagSocket(socket); in createTrafficStatsWithTags()
218 socket.close(); in createTrafficStatsWithTags()
226 Socket socket = server.accept(); in createTrafficStatsWithTags() local
227 InputStream in = socket.getInputStream(); in createTrafficStatsWithTags()
/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/hostsidetests/devicepolicy/app/DeviceAndProfileOwner/src/com/android/cts/deviceandprofileowner/
DAlwaysOnVpnTest.java167 FileDescriptor socket = Os.socket(AF_INET, SOCK_DGRAM, IPPROTO_ICMP); in checkPing() local
176 Os.connect(socket, InetAddress.getByName(host), port); in checkPing()
177 Os.write(socket, echo, 0, echo.length); in checkPing()
182 pollfd.fd = socket; in checkPing()
187 int read = Os.read(socket, reply, 0, echo.length); in checkPing()
197 InetSocketAddress local = (InetSocketAddress) Os.getsockname(socket); in checkPing()
/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()
DAudioProtocol.cpp52 bool AudioProtocol::handleReplyHeader(ClientSocket& socket, uint32_t* data, CommandId& id) in handleReplyHeader() argument
54 if (!socket.readData((char*)data, REPLY_HEADER_SIZE)) { in handleReplyHeader()
/cts/apps/CameraITS/pymodules/its/
Ddevice.py23 import socket
103 socket_lock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
108 except socket.error:
165 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/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/tests/tests/media/src/android/media/cts/
DMediaPlayerFlakyNetworkTest.java284 Socket socket, int buffersize, HttpParams params) throws IOException { in createHttpDataTransmitter() argument
285 return createSessionOutputBuffer(socket, buffersize, params); in createHttpDataTransmitter()
289 Socket socket, int buffersize, HttpParams params) throws IOException { in createSessionOutputBuffer() argument
290 return new SocketOutputBuffer(socket, buffersize, params) { in createSessionOutputBuffer()
/cts/tests/tests/bluetooth/src/android/bluetooth/cts/
DBasicAdapterTest.java215 BluetoothServerSocket socket = adapter.listenUsingRfcommWithServiceRecord( in test_listenUsingRfcommWithServiceRecord() local
217 assertNotNull(socket); in test_listenUsingRfcommWithServiceRecord()
218 socket.close(); in test_listenUsingRfcommWithServiceRecord()
/cts/tests/tests/os/src/android/os/cts/
DParcelFileDescriptorTest.java102 Socket socket; in testFromSocket() local
103 socket = new Socket(InetAddress.getLocalHost(), PORT); in testFromSocket()
104 ParcelFileDescriptor pfd = ParcelFileDescriptor.fromSocket(socket); in testFromSocket()
108 socket.close(); in testFromSocket()
/cts/libs/testserver/src/android/webkit/cts/
DCtsTestServer.java950 Socket socket = mSocket.accept(); in run() local
953 mSockets.add(socket); in run()
959 conn.bind(socket, params); in run()
969 mExecutorService.execute(new HandleResponseTask(conn, request, socket)); in run()
1000 for (Socket socket : mSockets) { in shutDownOnClientThread()
1001 socket.close(); in shutDownOnClientThread()
1020 HttpRequest request, Socket socket) { in HandleResponseTask() argument
1023 this.mSocket = socket; in HandleResponseTask()
/cts/tests/tests/net/jni/
DNativeMultinetworkJni.c76 int fd = socket(AF_INET6, SOCK_DGRAM, IPPROTO_UDP); in Java_android_net_cts_MultinetworkApiTest_runSetsocknetwork()
136 int fd = socket(res->ai_family, res->ai_socktype, res->ai_protocol); in Java_android_net_cts_MultinetworkApiTest_runDatagramCheck()
/cts/apps/CtsVerifier/src/com/android/cts/verifier/security/
DKeyChainTest.java371 public String chooseClientAlias(String[] keyTypes, Principal[] issuers, Socket socket) { in chooseClientAlias() argument
376 socket.getInetAddress().getHostName(), socket.getPort(), in chooseClientAlias()
390 Socket socket) { in chooseServerAlias() argument
/cts/suite/audio_quality/lib/src/
DClientSocket.cpp43 mSocket = socket(AF_INET, SOCK_STREAM, 0); in init()

12