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

12345

/frameworks/support/compat/src/main/java/androidx/core/net/
H A DTrafficStatsCompat.java113 public static void tagSocket(Socket socket) throws SocketException { argument
114 TrafficStats.tagSocket(socket);
123 public static void untagSocket(Socket socket) throws SocketException { argument
124 TrafficStats.untagSocket(socket);
136 public static void tagDatagramSocket(@NonNull DatagramSocket socket) throws SocketException { argument
138 TrafficStats.tagDatagramSocket(socket);
140 final ParcelFileDescriptor pfd = ParcelFileDescriptor.fromDatagramSocket(socket);
141 TrafficStats.tagSocket(new DatagramSocketWrapper(socket, pfd.getFileDescriptor()));
153 public static void untagDatagramSocket(@NonNull DatagramSocket socket) throws SocketException { argument
155 TrafficStats.untagDatagramSocket(socket);
[all...]
H A DDatagramSocketWrapper.java31 DatagramSocketWrapper(DatagramSocket socket, FileDescriptor fd) throws SocketException { argument
32 super(new DatagramSocketImplWrapper(socket, fd));
39 DatagramSocketImplWrapper(DatagramSocket socket, FileDescriptor fd) { argument
41 this.localport = socket.getLocalPort();
/frameworks/opt/net/voip/src/jni/rtp/
H A DRtpStream.cpp22 #include <sys/socket.h>
48 int socket = ::socket(ss.ss_family, SOCK_DGRAM, 0); local
50 if (socket == -1 || bind(socket, (sockaddr *)&ss, sizeof(ss)) != 0 ||
51 getsockname(socket, (sockaddr *)&ss, &len) != 0) {
53 ::close(socket);
61 env->SetIntField(thiz, gSocket, socket);
64 ::close(socket);
66 socket
91 int socket = env->GetIntField(thiz, gSocket); local
[all...]
/frameworks/base/core/java/android/net/
H A DNetwork.java186 Socket socket = createSocket();
189 if (localAddress != null) socket.bind(localAddress);
190 socket.connect(new InetSocketAddress(hostAddresses[i], port));
192 return socket;
194 if (failed) IoUtils.closeQuietly(socket);
211 Socket socket = createSocket();
214 socket.bind(new InetSocketAddress(localAddress, localPort));
215 socket.connect(new InetSocketAddress(address, port));
218 if (failed) IoUtils.closeQuietly(socket);
220 return socket;
356 bindSocket(DatagramSocket socket) argument
368 bindSocket(Socket socket) argument
[all...]
H A DSSLCertificateSocketFactory.java56 * The handshake timeout does not apply to actual TCP socket connection.
65 * use {@link InetAddress} or which return an unconnected socket, you MUST
77 * <p>On development devices, "setprop socket.relaxsslcheck yes" bypasses all
118 * Returns a new socket factory instance with an optional handshake timeout.
121 * for none. The socket timeout is reset to 0 after the handshake.
129 * Returns a new socket factory instance with an optional handshake timeout
133 * for none. The socket timeout is reset to 0 after the handshake.
142 * Returns a new instance of a socket factory with all SSL security checks
149 * for none. The socket timeout is reset to 0 after the handshake.
158 * Returns a socket factor
197 verifyHostname(Socket socket, String hostname) argument
345 getNpnSelectedProtocol(Socket socket) argument
359 getAlpnSelectedProtocol(Socket socket) argument
396 setUseSessionTickets(Socket socket, boolean useSessionTickets) argument
408 setHostname(Socket socket, String hostName) argument
423 setSoWriteTimeout(Socket socket, int writeTimeoutMilliseconds) argument
428 castToOpenSSLSocket(Socket socket) argument
[all...]
H A DSntpClient.java87 // This flag only affects DNS resolution and not other socket semantics,
103 DatagramSocket socket = null;
106 socket = new DatagramSocket();
107 network.bindSocket(socket);
108 socket.setSoTimeout(timeout);
122 socket.send(request);
126 socket.receive(response);
168 if (socket != null) {
169 socket.close();
H A DIpSecManager.java322 * Apply an IPsec transform to a stream socket.
324 * <p>This applies transport mode encapsulation to the given socket. Once applied, I/O on the
325 * socket will be encapsulated according to the parameters of the {@code IpSecTransform}. When
326 * the transform is removed from the socket by calling {@link #removeTransportModeTransforms},
327 * unprotected traffic can resume on that socket.
329 * <p>For security reasons, the destination address of any traffic on the socket must match the
331 * other IP address will result in an IOException. In addition, reads and writes on the socket
337 * failing to complete. As such, applications requiring graceful shutdown MUST close the socket
339 * (in batches), so the returning of a close function does not guarantee shutdown of a socket.
340 * Setting an SO_LINGER timeout results in socket closur
363 applyTransportModeTransform(@onNull Socket socket, @PolicyDirection int direction, @NonNull IpSecTransform transform) argument
400 applyTransportModeTransform(@onNull DatagramSocket socket, @PolicyDirection int direction, @NonNull IpSecTransform transform) argument
447 applyTransportModeTransform(@onNull FileDescriptor socket, @PolicyDirection int direction, @NonNull IpSecTransform transform) argument
473 removeTransportModeTransforms(@onNull Socket socket) argument
493 removeTransportModeTransforms(@onNull DatagramSocket socket) argument
510 removeTransportModeTransforms(@onNull FileDescriptor socket) argument
[all...]
H A DLocalSocket.java27 * Creates a (non-server) socket in the UNIX-domain namespace. The interface
41 /** unknown socket type (used for constructor with existing file descriptor) */
43 /** Datagram socket type */
45 /** Stream socket type */
47 /** Sequential packet socket type */
51 * Creates a AF_LOCAL/UNIX domain stream socket.
58 * Creates a AF_LOCAL/UNIX domain stream socket with given socket type
76 * AF_LOCAL/UNIX domain stream socket. Note: the FileDescriptor must be closed by the caller:
96 LocalSocket socket
[all...]
H A DIIpSecService.aidl69 in ParcelFileDescriptor socket, int direction, int transformId);
74 void removeTransportModeTransforms(in ParcelFileDescriptor socket);
H A DTrafficStats.java264 * Any app can <em>accept</em> blame for traffic performed on a socket
326 public static void tagSocket(Socket socket) throws SocketException { argument
327 SocketTagger.get().tag(socket);
333 public static void untagSocket(Socket socket) throws SocketException { argument
334 SocketTagger.get().untag(socket);
346 public static void tagDatagramSocket(DatagramSocket socket) throws SocketException { argument
347 SocketTagger.get().tag(socket);
353 public static void untagDatagramSocket(DatagramSocket socket) throws SocketException { argument
354 SocketTagger.get().untag(socket);
358 * Tag the given {@link FileDescriptor} socket wit
[all...]
/frameworks/av/media/common_time/
H A Dutils.h20 #include <linux/socket.h>
/frameworks/base/core/java/org/apache/http/conn/scheme/
H A DLayeredSocketFactory.java40 * See there for things to consider when implementing a socket factory.
54 * Returns a socket connected to the given host that is layered over an
55 * existing socket. Used primarily for creating secure sockets through
58 * @param socket the existing socket
61 * @param autoClose a flag for closing the underling socket when the created
62 * socket is closed
64 * @return Socket a new socket
66 * @throws IOException if an I/O error occurs while creating the socket
71 Socket socket,
70 createSocket( Socket socket, String host, int port, boolean autoClose ) argument
[all...]
/frameworks/base/services/core/java/com/android/server/
H A DRecoverySystemService.java51 // The socket at /dev/socket/uncrypt to communicate with uncrypt.
104 // Connect to the uncrypt service socket.
105 LocalSocket socket = connectService();
106 if (socket == null) {
107 Slog.e(TAG, "Failed to connect to uncrypt socket");
111 // Read the status from the socket.
115 dis = new DataInputStream(socket.getInputStream());
116 dos = new DataOutputStream(socket.getOutputStream());
139 // waits for the ack so the socket wo
[all...]
/frameworks/native/libs/vr/libpdx_uds/private/uds/
H A Dclient_channel_factory.h16 static std::unique_ptr<pdx::ClientChannelFactory> Create(LocalHandle socket);
26 explicit ClientChannelFactory(LocalHandle socket);
/frameworks/base/core/java/android/security/net/config/
H A DRootTrustManager.java60 public void checkClientTrusted(X509Certificate[] certs, String authType, Socket socket) argument
65 config.getTrustManager().checkClientTrusted(certs, authType, socket);
78 public void checkServerTrusted(X509Certificate[] certs, String authType, Socket socket) argument
80 if (socket instanceof SSLSocket) {
81 SSLSocket sslSocket = (SSLSocket) socket;
88 config.getTrustManager().checkServerTrusted(certs, authType, socket);
/frameworks/base/cmds/interrupter/
H A Dinterrupter.c31 #include <sys/socket.h>
/frameworks/base/core/java/com/android/internal/backup/
H A DIBackupTransport.aidl237 int performFullBackup(in PackageInfo targetPackage, in ParcelFileDescriptor socket, int flags);
269 * The transport writes some data to the socket supplied to this call, and returns
281 * <p>The transport should always close this socket when returning from this method.
282 * Do not cache this socket across multiple calls or you may leak file descriptors.
284 * @param socket The file descriptor that the transport will use for delivering the
285 * streamed archive. The transport must close this socket in all cases when returning
293 int getNextFullRestoreDataChunk(in ParcelFileDescriptor socket);
/frameworks/opt/net/wifi/libwifi_system_iface/
H A Dinterface_tool.cpp21 #include <sys/socket.h>
23 struct sockaddr and must be included after sys/socket.h. */
56 base::unique_fd sock(socket(PF_INET, SOCK_DGRAM | SOCK_CLOEXEC, 0));
58 LOG(ERROR) << "Failed to open socket to set up/down state ("
72 base::unique_fd sock(socket(PF_INET, SOCK_DGRAM | SOCK_CLOEXEC, 0));
74 LOG(ERROR) << "Failed to open socket to set up/down state ("
114 base::unique_fd sock(socket(PF_INET, SOCK_DGRAM | SOCK_CLOEXEC, 0));
116 LOG(ERROR) << "Failed to open socket to set MAC address ("
/frameworks/base/core/java/android/bluetooth/
H A DBluetoothAdapter.java561 * bluetooth socket.
1907 * Create a listening, secure RFCOMM Bluetooth socket.
1908 * <p>A remote device connecting to this socket will be authenticated and
1909 * communication on this socket will be encrypted.
1926 * Create a listening, secure RFCOMM Bluetooth socket.
1927 * <p>A remote device connecting to this socket will be authenticated and
1928 * communication on this socket will be encrypted.
1947 BluetoothServerSocket socket =
1950 int errno = socket.mSocket.bindListen();
1952 socket
[all...]
/frameworks/base/core/java/android/app/backup/
H A DBackupTransport.java427 * the socket file descriptor on which the transport will receive the data itself.
437 * read() from the socket except as instructed to via the {@link #sendBackupData(int)}
442 * its datastore, if appropriate, and close the socket that had been provided in
450 * @param socket The socket file descriptor through which the data will be provided.
461 public int performFullBackup(PackageInfo targetPackage, ParcelFileDescriptor socket, argument
463 return performFullBackup(targetPackage, socket);
470 public int performFullBackup(PackageInfo targetPackage, ParcelFileDescriptor socket) { argument
502 * Tells the transport to read {@code numBytes} bytes of data from the socket file
507 * socket
595 getNextFullRestoreDataChunk(ParcelFileDescriptor socket) argument
725 performFullBackup(PackageInfo targetPackage, ParcelFileDescriptor socket, int flags) argument
762 getNextFullRestoreDataChunk(ParcelFileDescriptor socket) argument
[all...]
/frameworks/base/services/backup/java/com/android/server/backup/restore/
H A DRestoreFileRunnable.java41 FileMetadata info, ParcelFileDescriptor socket, int token) throws IOException {
51 mSocket = ParcelFileDescriptor.dup(socket.getFileDescriptor());
40 RestoreFileRunnable(BackupManagerService backupManagerService, IBackupAgent agent, FileMetadata info, ParcelFileDescriptor socket, int token) argument
/frameworks/base/tests/net/java/android/net/
H A DIpSecManagerTest.java184 Os.socket(AF_INET, SOCK_DGRAM, IPPROTO_UDP));
200 Socket socket = new Socket();
207 socket, IpSecManager.DIRECTION_IN, dummyTransform);
210 assertNotNull(socket.getFileDescriptor$());
215 Socket socket = new Socket();
219 mIpSecManager.removeTransportModeTransforms(socket);
222 assertNotNull(socket.getFileDescriptor$());
232 Os.socket(AF_INET, SOCK_DGRAM, IPPROTO_UDP));
/frameworks/base/core/tests/BTtraffic/src/com/android/google/experimental/bttraffic/
H A DBTtraffic.java182 Log.d(TAG, "getting server socket");
187 Log.d(TAG, "error creating server socket, stopping thread");
192 Log.d(TAG, "got server socket, starting accept loop");
193 BluetoothSocket socket = null;
196 socket = serverSocket.accept();
200 doListening(socket.getInputStream(), socket.getOutputStream());
207 Log.d(TAG, "closing socket and stopping service");
209 safeClose(socket);
280 BluetoothSocket socket
[all...]
/frameworks/base/cmds/statsd/src/socket/
H A DStatsSocketListener.cpp24 #include <sys/socket.h>
68 int socket = cli->getSocket(); local
74 ssize_t n = recvmsg(socket, &hdr, 0);
114 mListener->OnLogEvent(&event, false /*reconnected, N/A in statsd socket*/);
/frameworks/base/core/java/com/android/internal/os/
H A DWebViewZygoteInit.java51 protected ZygoteConnection createNewConnection(LocalSocket socket, String abiList) argument
53 return new WebViewZygoteConnection(socket, abiList);
58 WebViewZygoteConnection(LocalSocket socket, String abiList) throws IOException { argument
59 super(socket, abiList);
121 throw new IllegalStateException("Error writing to command socket", ioe);
154 // Add the abstract socket to the FD whitelist so that the native zygote code

Completed in 2482 milliseconds

12345