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

123

/frameworks/base/core/java/android/net/
H A DLinkSocketNotifier.java32 * If the duplicate socket is accepted, the original will be marked invalid
53 * @param socket the LinkSocket that lost its link
60 public void onLinkLost(LinkSocket socket); argument
66 * @param socket the LinkSocket for which a new link was not found
73 public void onNewLinkUnavailable(LinkSocket socket); argument
78 * @param socket the linkSocet for which capabilities have changed
87 public void onCapabilitiesChanged(LinkSocket socket, LinkCapabilities changedCapabilities); argument
H A DSntpClient.java74 DatagramSocket socket = null;
76 socket = new DatagramSocket();
77 socket.setSoTimeout(timeout);
92 socket.send(request);
96 socket.receive(response);
126 if (socket != null) {
127 socket.close();
H A DTrafficStats.java155 public static void tagSocket(Socket socket) throws SocketException { argument
156 SocketTagger.get().tag(socket);
162 public static void untagSocket(Socket socket) throws SocketException { argument
163 SocketTagger.get().untag(socket);
H A DDnsPinger.java59 /** Short socket timeout so we don't block one any 'receive' call */
90 * Send a new ping via a socket. arg1 is ID, arg2 is timeout, obj is InetAddress to ping
100 DatagramSocket socket; field in class:DnsPinger.ActivePing
148 newActivePing.socket = new DatagramSocket();
149 // Set some socket properties
150 newActivePing.socket.setSoTimeout(SOCKET_TIMEOUT_MS);
154 newActivePing.socket.setNetworkInterface(NetworkInterface.getByName(
157 loge("sendDnsPing::Error binding to socket " + e);
174 newActivePing.socket.send(packet);
189 /** Each socket wil
[all...]
H A DVpnService.java153 * Protect a socket from VPN connections. The socket will be bound to the
161 * <p class="note">The socket is NOT closed by this method.
165 public boolean protect(int socket) { argument
168 dup = ParcelFileDescriptor.fromFd(socket);
187 public boolean protect(Socket socket) { argument
188 return protect(socket.getFileDescriptor$().getInt$());
198 public boolean protect(DatagramSocket socket) { argument
199 return protect(socket.getFileDescriptor$().getInt$());
/frameworks/base/voip/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, gNative, socket);
64 ::close(socket);
66 socket
91 int socket = ::dup(env->GetIntField(thiz, gNative)); local
100 int socket = env->GetIntField(thiz, gNative); local
[all...]
H A DAudioGroup.cpp24 #include <sys/socket.h>
99 bool set(int mode, int socket, sockaddr_storage *remote,
165 bool AudioStream::set(int mode, int socket, sockaddr_storage *remote, argument
201 mSocket = socket;
481 bool remove(int socket);
583 // Create device socket.
600 // Give device socket a reasonable timeout.
694 bool AudioGroup::remove(int socket) argument
700 if (target->mSocket == socket) {
701 if (epoll_ctl(mEventQueue, EPOLL_CTL_DEL, socket, NUL
934 add(JNIEnv *env, jobject thiz, jint mode, jint socket, jstring jRemoteAddress, jint remotePort, jstring jCodecSpec, jint dtmfType) argument
1014 remove(JNIEnv *env, jobject thiz, jint socket) argument
[all...]
/frameworks/base/voip/java/android/net/rtp/
H A DAudioGroup.java148 int socket = stream.dup();
151 nativeAdd(stream.getMode(), socket,
154 mStreams.put(stream, socket);
161 private native void nativeAdd(int mode, int socket, String remoteAddress, argument
166 Integer socket = mStreams.remove(stream);
167 if (socket != null) {
168 nativeRemove(socket);
172 private native void nativeRemove(int socket); argument
/frameworks/base/core/java/android/net/http/
H A DAndroidHttpClientConnection.java81 private Socket socket = null; field in class:AndroidHttpClientConnection
89 * Bind socket and set HttpParams to AndroidHttpClientConnection
90 * @param socket outgoing socket
95 final Socket socket,
97 if (socket == null) {
104 socket.setTcpNoDelay(HttpConnectionParams.getTcpNoDelay(params));
105 socket.setSoTimeout(HttpConnectionParams.getSoTimeout(params));
109 socket.setSoLinger(linger > 0, linger);
111 this.socket
94 bind( final Socket socket, final HttpParams params) argument
[all...]
H A DCertificateChainValidator.java75 * @param sslSocket The secure connection socket
82 // get a valid SSLSession, close the socket if we fail
171 SSLSocket socket, String errorMessage, String defaultErrorMessage)
174 socket, errorMessage != null ? errorMessage : defaultErrorMessage);
177 private void closeSocketThrowException(SSLSocket socket, argument
183 if (socket != null) {
184 SSLSession session = socket.getSession();
189 socket.close();
170 closeSocketThrowException( SSLSocket socket, String errorMessage, String defaultErrorMessage) argument
/frameworks/base/tests/DumpRenderTree2/src/com/android/dumprendertree2/forwarder/
H A DConnectionHandler.java144 private void shutdown(Socket socket) { argument
149 if (!socket.isInputShutdown()) {
150 socket.shutdownInput();
156 if (!socket.isOutputShutdown()) {
157 socket.shutdownOutput();
163 if (!socket.isClosed()) {
164 socket.close();
/frameworks/base/tests/DumpRenderTree/src/com/android/dumprendertree/forwarder/
H A DAdbUtils.java78 * Send an ADB command using existing socket connection
80 * the streams provided must be from a socket connected to adbd already
82 * @param is input stream of the socket connection
83 * @param os output stream of the socket
104 * Get a tcp socket connection to specified IP address and port proxied by adb
106 * The proxying is transparent, e.g. if a socket is returned, then it can be written to and
115 Socket socket = new Socket(ADB_HOST, ADB_PORT);
117 if(!sendAdbCmd(socket.getInputStream(), socket.getOutputStream(), cmd)) {
118 socket
[all...]
H A DForwardServer.java86 private ServerSocket socket; field in class:ForwardServer.ServerRunner
88 public ServerRunner(ServerSocket socket) { argument
89 this.socket = socket;
95 Socket localSocket = socket.accept();
101 Log.w(LOGTAG, "error while closing socket", ioe);
H A DForwarder.java62 private void shutdown(Socket socket) { argument
64 socket.shutdownInput();
69 socket.shutdownOutput();
74 socket.close();
/frameworks/base/core/java/android/bluetooth/
H A DBluetoothAdapter.java858 * Create a listening, secure RFCOMM Bluetooth socket.
859 * <p>A remote device connecting to this socket will be authenticated and
860 * communication on this socket will be encrypted.
872 BluetoothServerSocket socket = new BluetoothServerSocket(
874 int errno = socket.mSocket.bindListen();
877 socket.close();
879 socket.mSocket.throwErrnoNative(errno);
881 return socket;
885 * Create a listening, secure RFCOMM Bluetooth socket with Service Record.
886 * <p>A remote device connecting to this socket wil
[all...]
/frameworks/base/keystore/java/android/security/
H A DKeyStore.java171 LocalSocket socket = new LocalSocket();
173 socket.connect(sAddress);
175 OutputStream out = socket.getOutputStream();
183 socket.shutdownOutput();
185 InputStream in = socket.getInputStream();
216 socket.close();
/frameworks/base/tests/CoreTests/android/core/
H A DSSLSocketTest.java85 Socket socket = secure ? socketFactory.createSocket()
88 socket.setKeepAlive(true);
89 socket.setSoTimeout(timeout * 1000);
91 socket.connect(address);
94 OutputStream output = socket.getOutputStream();
98 DataInputStream input = new DataInputStream(socket.getInputStream());
173 socket.close();
178 * Invokes fetch() with the default socket factory.
337 final Socket socket = clientFactory.createSocket();
338 socket
[all...]
/frameworks/base/tests/BandwidthTests/src/com/android/tests/bandwidthenforcement/
H A DBandwidthEnforcementTestService.java155 final DatagramSocket socket = new DatagramSocket();
157 socket.setSoTimeout(10000);
162 socket.send(queryPacket);
166 socket.receive(replyPacket);
170 socket.close();
/frameworks/base/services/java/com/android/server/
H A DNativeDaemonConnector.java72 String socket, int responseQueueSize, String logTag) {
76 mSocket = socket;
112 LocalSocket socket = null;
115 socket = new LocalSocket();
119 socket.connect(address);
121 InputStream inputStream = socket.getInputStream();
122 mOutputStream = socket.getOutputStream();
189 if (socket != null) {
190 socket.close();
193 Slog.w(TAG, "Failed closing socket", e
71 NativeDaemonConnector(INativeDaemonConnectorCallbacks callbacks, String socket, int responseQueueSize, String logTag) argument
[all...]
/frameworks/base/cmds/ip-up-vpn/
H A Dip-up-vpn.c26 #include <sys/socket.h>
87 int s = socket(AF_INET, SOCK_DGRAM, 0);
/frameworks/base/cmds/keystore/
H A Dkeystore_cli.cpp21 #include <sys/socket.h>
H A Dkeystore_get.h24 #include <sys/socket.h>
/frameworks/base/core/jni/
H A Dandroid_server_NetworkManagementSocketTagger.cpp29 #include <sys/socket.h>
/frameworks/base/libs/rs/
H A DrsFifoSocket.cpp26 #include <sys/socket.h>
/frameworks/base/services/jni/
H A Dcom_android_server_connectivity_Vpn.cpp27 #include <sys/socket.h>
305 static int bind_to_interface(int socket, const char *name) argument
307 if (setsockopt(socket, SOL_SOCKET, SO_BINDTODEVICE, name, strlen(name))) {
308 LOGE("Cannot bind socket to %s: %s", name, strerror(errno));
436 static void protect(JNIEnv *env, jobject thiz, jint socket, jstring jName) argument
443 if (bind_to_interface(socket, name) < 0) {
444 throwException(env, SYSTEM_ERROR, "Cannot protect socket");
464 inet4 = socket(AF_INET, SOCK_DGRAM, 0);
467 inet6 = socket(AF_INET6, SOCK_DGRAM, 0);

Completed in 545 milliseconds

123