Home
last modified time | relevance | path

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

/cts/tests/tests/net/src/android/net/cts/
DLocalSocketTest.java115 LocalSocket socket = new LocalSocket(); in testAccessors() local
118 assertFalse(socket.isBound()); in testAccessors()
119 socket.bind(addr); in testAccessors()
120 assertTrue(socket.isBound()); in testAccessors()
121 assertEquals(addr, socket.getLocalSocketAddress()); in testAccessors()
123 String str = socket.toString(); in testAccessors()
126 socket.setReceiveBufferSize(1999); in testAccessors()
127 assertEquals(1999 << 1, socket.getReceiveBufferSize()); in testAccessors()
129 socket.setSendBufferSize(1998); in testAccessors()
130 assertEquals(1998 << 1, socket.getSendBufferSize()); in testAccessors()
[all …]
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()
DSSLCertificateSocketFactoryTest.java72 Socket socket = new Socket(); in testCreateSocket() local
73 mFactory.createSocket(socket, host, port, true); in testCreateSocket()
78 Socket socket = null; in testCreateSocket() local
79 socket = mFactory.createSocket(host, port); in testCreateSocket()
80 assertNotNull(socket); in testCreateSocket()
81 assertNotNull(socket.getOutputStream()); in testCreateSocket()
82 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/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 …]
DRemoteAudio.h43 RemoteAudio(ClientSocket& socket);
/cts/tests/tests/security/src/android/security/cts/
DOpenSSLEarlyCCSTest.java241 SSLSocket socket = (SSLSocket) sslContext.getSocketFactory().createSocket(); in clientConnectAndHandshake() local
242 setClientSocket(socket); in clientConnectAndHandshake()
245 socket.connect(serverAddress); in clientConnectAndHandshake()
246 Log.i(TAG, "Client connected to server from " + socket.getLocalSocketAddress()); in clientConnectAndHandshake()
248 socket.getOutputStream().write("client".getBytes()); in clientConnectAndHandshake()
249 socket.getOutputStream().flush(); in clientConnectAndHandshake()
251 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 …]
DOpenSSLHeartbleedTest.java244 SSLSocket socket = (SSLSocket) sslContext.getSocketFactory().createSocket(); in clientConnectAndHandshake() local
245 setClientSocket(socket); in clientConnectAndHandshake()
248 socket.connect(serverAddress); in clientConnectAndHandshake()
249 Log.i(TAG, "Client connected to server from " + socket.getLocalSocketAddress()); in clientConnectAndHandshake()
251 socket.getOutputStream().write("client".getBytes()); in clientConnectAndHandshake()
252 socket.getOutputStream().flush(); in clientConnectAndHandshake()
254 int b = socket.getInputStream().read(); in clientConnectAndHandshake()
260 socket.close(); in clientConnectAndHandshake()
290 SSLSocket socket = null; in serverAcceptAndHandshake() local
294 socket = (SSLSocket) serverSocket.accept(); in serverAcceptAndHandshake()
[all …]
/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.java209 Socket socket = new Socket("localhost", server.getLocalPort()); in createTrafficStatsWithTags() local
212 socket.setTcpNoDelay(true); in createTrafficStatsWithTags()
213 OutputStream out = socket.getOutputStream(); in createTrafficStatsWithTags()
217 TrafficStats.tagSocket(socket); in createTrafficStatsWithTags()
222 socket.close(); in createTrafficStatsWithTags()
230 Socket socket = server.accept(); in createTrafficStatsWithTags() local
231 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/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/tests/tests/media/src/android/media/cts/
DMediaPlayerFlakyNetworkTest.java265 Socket socket, int buffersize, HttpParams params) throws IOException { in createHttpDataTransmitter() argument
266 return createSessionOutputBuffer(socket, buffersize, params); in createHttpDataTransmitter()
270 Socket socket, int buffersize, HttpParams params) throws IOException { in createSessionOutputBuffer() argument
271 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/tests/jni/
Dandroid_net_cts_NetlinkSocket.cpp32 int sock = socket(PF_NETLINK, SOCK_DGRAM, NETLINK_KOBJECT_UEVENT); in android_net_cts_NetlinkSocket_create()
/cts/tests/tests/net/src/android/net/wifi/cts/
DNsdManagerTest.java266 ServerSocket socket; in runTest() local
270 socket = new ServerSocket(0); in runTest()
271 localPort = socket.getLocalPort(); in runTest()
/cts/suite/audio_quality/lib/src/
DClientSocket.cpp43 mSocket = socket(AF_INET, SOCK_STREAM, 0); in init()
/cts/tests/tests/net/src/android/net/ipv6/cts/
DPingTest.java72 FileDescriptor s = Libcore.os.socket(AF_INET6, SOCK_DGRAM, IPPROTO_ICMPV6); in createPingSocket()
/cts/tests/tests/keystore/src/android/keystore/cts/
DAndroidKeyPairGeneratorTest.java537 public String chooseClientAlias(String[] keyType, Principal[] issuers, Socket socket) { in chooseClientAlias() argument
542 public String chooseServerAlias(String keyType, Principal[] issuers, Socket socket) { in chooseServerAlias() argument
/cts/libs/testserver/src/android/webkit/cts/
DCtsTestServer.java883 Socket socket = mSocket.accept(); in run() local
888 conn.bind(socket, params); in run()
/cts/tools/dex-tools/dex/
Dclasses0.out.dex30037 public abstract java.net.DatagramSocket socket()
30444 public abstract java.net.ServerSocket socket()
30486 public abstract java.net.Socket socket()
57383 private java.net.Socket socket
65835 private java.net.Socket socket
68378 private final org.apache.harmony.luni.net.PlainSocketImpl socket
68408 private org.apache.harmony.luni.net.PlainSocketImpl socket
72049 private java.net.DatagramSocket socket
72123 public java.net.DatagramSocket socket()
72911 private final java.net.ServerSocket socket
[all …]
Dclasses.out.dex46062 private java.net.Socket socket
148296 private java.net.Socket socket
148421 private java.net.Socket socket
149686 private volatile java.net.Socket socket
152194 private final java.net.Socket socket