Home
last modified time | relevance | path

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

1234

/frameworks/opt/net/voip/src/jni/rtp/
DRtpStream.cpp48 int socket = ::socket(ss.ss_family, SOCK_DGRAM, 0); in create() local
50 if (socket == -1 || bind(socket, (sockaddr *)&ss, sizeof(ss)) != 0 || in create()
51 getsockname(socket, (sockaddr *)&ss, &len) != 0) { in create()
53 ::close(socket); in create()
61 env->SetIntField(thiz, gSocket, socket); in create()
64 ::close(socket); in create()
66 socket = ::socket(ss.ss_family, SOCK_DGRAM, 0); in create()
67 if (socket != -1) { in create()
77 if (bind(socket, (sockaddr *)&ss, sizeof(ss)) == 0) { in create()
78 env->SetIntField(thiz, gSocket, socket); in create()
[all …]
/frameworks/base/core/java/android/net/
DSSLCertificateSocketFactory.java231 public static void verifyHostname(Socket socket, String hostname) throws IOException { in verifyHostname() argument
232 if (!(socket instanceof SSLSocket)) { in verifyHostname()
239 SSLSocket ssl = (SSLSocket) socket; in verifyHostname()
387 public byte[] getNpnSelectedProtocol(Socket socket) { in getNpnSelectedProtocol() argument
388 return castToOpenSSLSocket(socket).getNpnSelectedProtocol(); in getNpnSelectedProtocol()
402 public byte[] getAlpnSelectedProtocol(Socket socket) { in getAlpnSelectedProtocol() argument
403 return castToOpenSSLSocket(socket).getAlpnSelectedProtocol(); in getAlpnSelectedProtocol()
440 public void setUseSessionTickets(Socket socket, boolean useSessionTickets) { in setUseSessionTickets() argument
441 castToOpenSSLSocket(socket).setUseSessionTickets(useSessionTickets); in setUseSessionTickets()
452 public void setHostname(Socket socket, String hostName) { in setHostname() argument
[all …]
DPrivateDnsConnectivityChecker.java49 try (SSLSocket socket = (SSLSocket) factory.createSocket()) { in canConnectToPrivateDnsServer() argument
50 socket.setSoTimeout(CONNECTION_TIMEOUT_MS); in canConnectToPrivateDnsServer()
51 socket.connect(new InetSocketAddress(hostname, PRIVATE_DNS_PORT)); in canConnectToPrivateDnsServer()
52 if (!socket.isConnected()) { in canConnectToPrivateDnsServer()
56 socket.startHandshake(); in canConnectToPrivateDnsServer()
DSntpClient.java107 DatagramSocket socket = null; in requestTime() local
111 socket = new DatagramSocket(); in requestTime()
112 network.bindSocket(socket); in requestTime()
113 socket.setSoTimeout(timeout); in requestTime()
127 socket.send(request); in requestTime()
131 socket.receive(response); in requestTime()
173 if (socket != null) { in requestTime()
174 socket.close(); in requestTime()
DIpSecManager.java359 public void applyTransportModeTransform(@NonNull Socket socket, in applyTransportModeTransform() argument
362 socket.getSoLinger(); in applyTransportModeTransform()
364 applyTransportModeTransform(socket.getFileDescriptor$(), direction, transform); in applyTransportModeTransform()
396 public void applyTransportModeTransform(@NonNull DatagramSocket socket, in applyTransportModeTransform() argument
398 applyTransportModeTransform(socket.getFileDescriptor$(), direction, transform); in applyTransportModeTransform()
443 public void applyTransportModeTransform(@NonNull FileDescriptor socket, in applyTransportModeTransform() argument
447 try (ParcelFileDescriptor pfd = ParcelFileDescriptor.dup(socket)) { in applyTransportModeTransform()
469 public void removeTransportModeTransforms(@NonNull Socket socket) throws IOException { in removeTransportModeTransforms() argument
471 socket.getSoLinger(); in removeTransportModeTransforms()
473 removeTransportModeTransforms(socket.getFileDescriptor$()); in removeTransportModeTransforms()
[all …]
DLocalSocket.java99 LocalSocket socket = new LocalSocket(impl, sockType); in createConnectedLocalSocket() local
100 socket.isConnected = true; in createConnectedLocalSocket()
101 socket.isBound = true; in createConnectedLocalSocket()
102 socket.implCreated = true; in createConnectedLocalSocket()
103 return socket; in createConnectedLocalSocket()
DTrafficStats.java355 public static void tagSocket(Socket socket) throws SocketException { in tagSocket() argument
356 SocketTagger.get().tag(socket); in tagSocket()
370 public static void untagSocket(Socket socket) throws SocketException { in untagSocket() argument
371 SocketTagger.get().untag(socket); in untagSocket()
383 public static void tagDatagramSocket(DatagramSocket socket) throws SocketException { in tagDatagramSocket() argument
384 SocketTagger.get().tag(socket); in tagDatagramSocket()
390 public static void untagDatagramSocket(DatagramSocket socket) throws SocketException { in untagDatagramSocket() argument
391 SocketTagger.get().untag(socket); in untagDatagramSocket()
/frameworks/base/services/core/java/com/android/server/am/
DLmkdConnection.java118 final LocalSocket socket = openSocket(); in connect() local
120 if (socket == null) { in connect()
128 ostream = socket.getOutputStream(); in connect()
129 istream = socket.getInputStream(); in connect()
131 IoUtils.closeQuietly(socket); in connect()
137 IoUtils.closeQuietly(socket); in connect()
141 mLmkdSocket = socket; in connect()
234 final LocalSocket socket; in openSocket() local
237 socket = new LocalSocket(LocalSocket.SOCKET_SEQPACKET); in openSocket()
238 socket.connect( in openSocket()
[all …]
/frameworks/base/core/java/android/net/util/
DDnsUtils.java169 final FileDescriptor socket; in findSrcAddress() local
171 socket = Os.socket(domain, SOCK_DGRAM, IPPROTO_UDP); in findSrcAddress()
177 if (network != null) network.bindSocket(socket); in findSrcAddress()
178 Os.connect(socket, new InetSocketAddress(addr, 0)); in findSrcAddress()
179 return ((InetSocketAddress) Os.getsockname(socket)).getAddress(); in findSrcAddress()
183 IoUtils.closeQuietly(socket); in findSrcAddress()
363 final FileDescriptor socket; in checkConnectivity() local
365 socket = Os.socket(domain, SOCK_DGRAM, IPPROTO_UDP); in checkConnectivity()
370 if (network != null) network.bindSocket(socket); in checkConnectivity()
371 Os.connect(socket, addr); in checkConnectivity()
[all …]
DSocketUtils.java50 public static void bindSocketToInterface(@NonNull FileDescriptor socket, @NonNull String iface) in bindSocketToInterface() argument
55 Os.setsockoptIfreq(socket, SOL_SOCKET, SO_BINDTODEVICE, iface); in bindSocketToInterface()
56 NetworkUtils.protectFromVpn(socket); in bindSocketToInterface()
/frameworks/base/services/core/java/com/android/server/recoverysystem/
DRecoverySystemService.java123 UncryptSocket socket = new UncryptSocket(); in connectService() local
124 if (!socket.connectService()) { in connectService()
125 socket.close(); in connectService()
128 return socket; in connectService()
203 UncryptSocket socket = mInjector.connectService(); in uncrypt() local
204 if (socket == null) { in uncrypt()
213 int status = socket.getPercentageUncrypted(); in uncrypt()
235 socket.sendAck(); in uncrypt()
244 socket.sendAck(); in uncrypt()
252 socket.close(); in uncrypt()
[all …]
/frameworks/base/core/java/android/app/backup/
DBackupTransport.java489 public int performFullBackup(PackageInfo targetPackage, ParcelFileDescriptor socket, in performFullBackup() argument
491 return performFullBackup(targetPackage, socket); in performFullBackup()
498 public int performFullBackup(PackageInfo targetPackage, ParcelFileDescriptor socket) { in performFullBackup() argument
623 public int getNextFullRestoreDataChunk(ParcelFileDescriptor socket) { in getNextFullRestoreDataChunk() argument
753 public int performFullBackup(PackageInfo targetPackage, ParcelFileDescriptor socket, in performFullBackup() argument
755 return BackupTransport.this.performFullBackup(targetPackage, socket, flags); in performFullBackup()
790 public int getNextFullRestoreDataChunk(ParcelFileDescriptor socket) { in getNextFullRestoreDataChunk() argument
791 return BackupTransport.this.getNextFullRestoreDataChunk(socket); in getNextFullRestoreDataChunk()
/frameworks/base/core/java/android/security/net/config/
DRootTrustManager.java62 public void checkClientTrusted(X509Certificate[] certs, String authType, Socket socket) in checkClientTrusted() argument
67 config.getTrustManager().checkClientTrusted(certs, authType, socket); in checkClientTrusted()
80 public void checkServerTrusted(X509Certificate[] certs, String authType, Socket socket) in checkServerTrusted() argument
82 if (socket instanceof SSLSocket) { in checkServerTrusted()
83 SSLSocket sslSocket = (SSLSocket) socket; in checkServerTrusted()
90 config.getTrustManager().checkServerTrusted(certs, authType, socket); in checkServerTrusted()
/frameworks/base/core/tests/BTtraffic/src/com/android/google/experimental/bttraffic/
DBTtraffic.java193 BluetoothSocket socket = null; in run() local
196 socket = serverSocket.accept(); in run()
200 doListening(socket.getInputStream(), socket.getOutputStream()); in run()
209 safeClose(socket); in run()
280 BluetoothSocket socket = null; in run() local
283 socket = device.createInsecureRfcommSocketToServiceRecord(SERVICE_UUID); in run()
284 socket.connect(); in run()
286 doSending(socket.getOutputStream()); in run()
292 safeClose(socket); in run()
/frameworks/base/core/java/android/bluetooth/
DBluetoothAdapter.java2480 BluetoothServerSocket socket = in listenUsingRfcommOn() local
2483 int errno = socket.mSocket.bindListen(); in listenUsingRfcommOn()
2485 socket.setChannel(socket.mSocket.getPort()); in listenUsingRfcommOn()
2493 return socket; in listenUsingRfcommOn()
2599 BluetoothServerSocket socket; in createNewRfcommSocketAndRecord() local
2600 socket = new BluetoothServerSocket(BluetoothSocket.TYPE_RFCOMM, auth, encrypt, in createNewRfcommSocketAndRecord()
2602 socket.setServiceName(name); in createNewRfcommSocketAndRecord()
2603 int errno = socket.mSocket.bindListen(); in createNewRfcommSocketAndRecord()
2610 return socket; in createNewRfcommSocketAndRecord()
2623 BluetoothServerSocket socket = in listenUsingInsecureRfcommOn() local
[all …]
/frameworks/native/services/surfaceflinger/
Dsurfaceflinger.rc8socket pdx/system/vr/display/client stream 0666 system graphics u:object_r:pdx_display_client_…
9socket pdx/system/vr/display/manager stream 0666 system graphics u:object_r:pdx_display_manager…
10socket pdx/system/vr/display/vsync stream 0666 system graphics u:object_r:pdx_display_vsync_e…
/frameworks/base/tests/net/java/android/net/
DIpSecManagerTest.java186 Os.socket(AF_INET, SOCK_DGRAM, IPPROTO_UDP)); in testOpenEncapsulationSocket()
202 Socket socket = new Socket(); in testApplyTransportModeTransformEnsuresSocketCreation() local
209 socket, IpSecManager.DIRECTION_IN, dummyTransform); in testApplyTransportModeTransformEnsuresSocketCreation()
212 assertNotNull(socket.getFileDescriptor$()); in testApplyTransportModeTransformEnsuresSocketCreation()
217 Socket socket = new Socket(); in testRemoveTransportModeTransformsForcesSocketCreation() local
221 mIpSecManager.removeTransportModeTransforms(socket); in testRemoveTransportModeTransformsForcesSocketCreation()
224 assertNotNull(socket.getFileDescriptor$()); in testRemoveTransportModeTransformsForcesSocketCreation()
234 Os.socket(AF_INET, SOCK_DGRAM, IPPROTO_UDP)); in testOpenEncapsulationSocketOnRandomPort()
/frameworks/base/core/java/com/android/internal/os/
DAppZygoteInit.java45 protected ZygoteConnection createNewConnection(LocalSocket socket, String abiList) in createNewConnection() argument
47 return new AppZygoteConnection(socket, abiList); in createNewConnection()
52 AppZygoteConnection(LocalSocket socket, String abiList) throws IOException { in AppZygoteConnection() argument
53 super(socket, abiList); in AppZygoteConnection()
DWebViewZygoteInit.java46 protected ZygoteConnection createNewConnection(LocalSocket socket, String abiList) in createNewConnection() argument
48 return new WebViewZygoteConnection(socket, abiList); in createNewConnection()
53 WebViewZygoteConnection(LocalSocket socket, String abiList) throws IOException { in WebViewZygoteConnection() argument
54 super(socket, abiList); in WebViewZygoteConnection()
/frameworks/base/packages/services/Proxy/src/com/android/proxyhandler/
DProxyServer.java240 private void sendLine(Socket socket, String line) throws IOException { in sendLine() argument
241 OutputStream os = socket.getOutputStream(); in sendLine()
254 private void skipToRequestBody(Socket socket) throws IOException { in skipToRequestBody() argument
255 while (getLine(socket.getInputStream()).length() != 0); in skipToRequestBody()
337 Socket socket = serverSocket.accept(); in run() local
339 if (socket.getInetAddress().isLoopbackAddress()) { in run()
340 ProxyConnection parser = new ProxyConnection(socket); in run()
344 socket.close(); in run()
/frameworks/native/libs/vr/libpdx_uds/
Dclient_channel_factory.cpp42 ClientChannelFactory::ClientChannelFactory(LocalHandle socket) in ClientChannelFactory() argument
43 : socket_{std::move(socket)} {} in ClientChannelFactory()
52 LocalHandle socket) { in Create() argument
54 new ClientChannelFactory{std::move(socket)}}; in Create()
63 socket_.Reset(socket(AF_UNIX, SOCK_STREAM | SOCK_CLOEXEC, 0)); in Connect()
/frameworks/native/cmds/dumpstate/
Ddumpstate.rc8 socket dumpstate stream 0660 shell log
12 # dumpstatez generates a zipped bugreport but also uses a socket to print the file location once
15 socket dumpstate stream 0660 shell log
/frameworks/base/services/core/java/com/android/server/
DNativeDaemonConnector.java86 NativeDaemonConnector(INativeDaemonConnectorCallbacks callbacks, String socket, in NativeDaemonConnector() argument
88 this(callbacks, socket, responseQueueSize, logTag, maxLogSize, wl, in NativeDaemonConnector()
92 NativeDaemonConnector(INativeDaemonConnectorCallbacks callbacks, String socket, in NativeDaemonConnector() argument
96 mSocket = socket; in NativeDaemonConnector()
194 LocalSocket socket = null; in listenToSocket() local
197 socket = new LocalSocket(); in listenToSocket()
200 socket.connect(address); in listenToSocket()
202 InputStream inputStream = socket.getInputStream(); in listenToSocket()
204 mOutputStream = socket.getOutputStream(); in listenToSocket()
219 fdList = socket.getAncillaryFileDescriptors(); in listenToSocket()
[all …]
/frameworks/base/tests/BandwidthTests/src/com/android/tests/bandwidthenforcement/
DBandwidthEnforcementTestService.java161 final DatagramSocket socket = new DatagramSocket(); in testDns() local
163 socket.setSoTimeout(10000); in testDns()
168 socket.send(queryPacket); in testDns()
172 socket.receive(replyPacket); in testDns()
176 socket.close(); in testDns()
/frameworks/base/services/backup/backuplib/java/com/android/server/backup/transport/
DDelegatingTransport.java305 ParcelFileDescriptor socket, int flags) throws RemoteException { in performFullBackup() argument
306 return getDelegate().performFullBackup(targetPackage, socket, flags); in performFullBackup()
381 public int getNextFullRestoreDataChunk(ParcelFileDescriptor socket) throws RemoteException { in getNextFullRestoreDataChunk() argument
382 return getDelegate().getNextFullRestoreDataChunk(socket); in getNextFullRestoreDataChunk()

1234