Home
last modified time | relevance | path

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

123

/frameworks/base/voip/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 …]
DAudioGroup.cpp99 bool set(int mode, int socket, sockaddr_storage *remote,
165 bool AudioStream::set(int mode, int socket, sockaddr_storage *remote, in set() argument
201 mSocket = socket; in set()
934 jint socket, jstring jRemoteAddress, jint remotePort, in add() argument
956 socket = dup(socket); in add()
957 if (socket == -1) { in add()
979 if (!stream->set(mode, socket, &remote, codec, sampleRate, sampleCount, in add()
985 socket = -1; in add()
1015 close(socket); in add()
/frameworks/base/core/java/android/net/http/
DAndroidHttpClientConnection.java81 private Socket socket = null; field in AndroidHttpClientConnection
95 final Socket socket, in bind() argument
97 if (socket == null) { in bind()
104 socket.setTcpNoDelay(HttpConnectionParams.getTcpNoDelay(params)); in bind()
105 socket.setSoTimeout(HttpConnectionParams.getSoTimeout(params)); in bind()
109 socket.setSoLinger(linger > 0, linger); in bind()
111 this.socket = socket; in bind()
114 this.inbuffer = new SocketInputBuffer(socket, buffersize, params); in bind()
115 this.outbuffer = new SocketOutputBuffer(socket, buffersize, params); in bind()
159 return (this.open && this.socket != null && this.socket.isConnected()); in isOpen()
[all …]
DCertificateChainValidator.java184 SSLSocket socket, String errorMessage, String defaultErrorMessage) in closeSocketThrowException() argument
187 socket, errorMessage != null ? errorMessage : defaultErrorMessage); in closeSocketThrowException()
190 private void closeSocketThrowException(SSLSocket socket, in closeSocketThrowException() argument
196 if (socket != null) { in closeSocketThrowException()
197 SSLSession session = socket.getSession(); in closeSocketThrowException()
202 socket.close(); in closeSocketThrowException()
/frameworks/support/v4/java/android/support/v4/net/
DTrafficStatsCompat.java36 void tagSocket(Socket socket) throws SocketException; in tagSocket() argument
37 void untagSocket(Socket socket) throws SocketException; in untagSocket() argument
76 public void tagSocket(Socket socket) { in tagSocket() argument
80 public void untagSocket(Socket socket) { in untagSocket() argument
111 public void tagSocket(Socket socket) throws SocketException { in tagSocket() argument
112 TrafficStatsCompatIcs.tagSocket(socket); in tagSocket()
116 public void untagSocket(Socket socket) throws SocketException { in untagSocket() argument
117 TrafficStatsCompatIcs.untagSocket(socket); in untagSocket()
193 public static void tagSocket(Socket socket) throws SocketException { in tagSocket() argument
194 IMPL.tagSocket(socket); in tagSocket()
[all …]
/frameworks/base/core/java/android/bluetooth/
DBluetoothAdapter.java891 BluetoothServerSocket socket = new BluetoothServerSocket( in listenUsingRfcommOn() local
893 int errno = socket.mSocket.bindListen(); in listenUsingRfcommOn()
896 socket.close(); in listenUsingRfcommOn()
898 socket.mSocket.throwErrnoNative(errno); in listenUsingRfcommOn()
900 return socket; in listenUsingRfcommOn()
1003 BluetoothServerSocket socket; in createNewRfcommSocketAndRecord() local
1013 socket = new BluetoothServerSocket( in createNewRfcommSocketAndRecord()
1015 errno = socket.mSocket.bindListen(); in createNewRfcommSocketAndRecord()
1022 socket.close(); in createNewRfcommSocketAndRecord()
1027 socket.close(); in createNewRfcommSocketAndRecord()
[all …]
/frameworks/base/tests/DumpRenderTree2/src/com/android/dumprendertree2/forwarder/
DConnectionHandler.java144 private void shutdown(Socket socket) { in shutdown() argument
149 if (!socket.isInputShutdown()) { in shutdown()
150 socket.shutdownInput(); in shutdown()
156 if (!socket.isOutputShutdown()) { in shutdown()
157 socket.shutdownOutput(); in shutdown()
163 if (!socket.isClosed()) { in shutdown()
164 socket.close(); in shutdown()
/frameworks/base/core/java/android/net/
DSntpClient.java74 DatagramSocket socket = null; in requestTime() local
76 socket = new DatagramSocket(); in requestTime()
77 socket.setSoTimeout(timeout); in requestTime()
92 socket.send(request); in requestTime()
96 socket.receive(response); in requestTime()
126 if (socket != null) { in requestTime()
127 socket.close(); in requestTime()
DLinkSocketNotifier.java60 public void onLinkLost(LinkSocket socket); in onLinkLost() argument
73 public void onNewLinkUnavailable(LinkSocket socket); in onNewLinkUnavailable() argument
87 public void onCapabilitiesChanged(LinkSocket socket, LinkCapabilities changedCapabilities); in onCapabilitiesChanged() argument
DDnsPinger.java100 DatagramSocket socket; field in DnsPinger.ActivePing
148 newActivePing.socket = new DatagramSocket(); in handleMessage()
150 newActivePing.socket.setSoTimeout(SOCKET_TIMEOUT_MS); in handleMessage()
154 newActivePing.socket.setNetworkInterface(NetworkInterface.getByName( in handleMessage()
174 newActivePing.socket.send(packet); in handleMessage()
192 curPing.socket.receive(replyPacket); in handleMessage()
217 curPing.socket.close(); in handleMessage()
222 curPing.socket.close(); in handleMessage()
233 activePing.socket.close(); in handleMessage()
DVpnService.java165 public boolean protect(int socket) { in protect() argument
168 dup = ParcelFileDescriptor.fromFd(socket); in protect()
187 public boolean protect(Socket socket) { in protect() argument
188 return protect(socket.getFileDescriptor$().getInt$()); in protect()
198 public boolean protect(DatagramSocket socket) { in protect() argument
199 return protect(socket.getFileDescriptor$().getInt$()); in protect()
DTrafficStats.java171 public static void tagSocket(Socket socket) throws SocketException { in tagSocket() argument
172 SocketTagger.get().tag(socket); in tagSocket()
178 public static void untagSocket(Socket socket) throws SocketException { in untagSocket() argument
179 SocketTagger.get().untag(socket); in untagSocket()
DSSLCertificateSocketFactory.java180 public static void verifyHostname(Socket socket, String hostname) throws IOException { in verifyHostname() argument
181 if (!(socket instanceof SSLSocket)) { in verifyHostname()
188 SSLSocket ssl = (SSLSocket) socket; in verifyHostname()
304 public byte[] getNpnSelectedProtocol(Socket socket) { in getNpnSelectedProtocol() argument
305 return ((OpenSSLSocketImpl) socket).getNpnSelectedProtocol(); in getNpnSelectedProtocol()
/frameworks/support/v4/ics/android/support/v4/net/
DTrafficStatsCompatIcs.java48 public static void tagSocket(Socket socket) throws SocketException { in tagSocket() argument
49 TrafficStats.tagSocket(socket); in tagSocket()
52 public static void untagSocket(Socket socket) throws SocketException { in untagSocket() argument
53 TrafficStats.untagSocket(socket); in untagSocket()
/frameworks/base/tests/CoreTests/android/core/
DSSLSocketTest.java85 Socket socket = secure ? socketFactory.createSocket() in fetch() local
88 socket.setKeepAlive(true); in fetch()
89 socket.setSoTimeout(timeout * 1000); in fetch()
91 socket.connect(address); in fetch()
94 OutputStream output = socket.getOutputStream(); in fetch()
98 DataInputStream input = new DataInputStream(socket.getInputStream()); in fetch()
173 socket.close(); in fetch()
337 final Socket socket = clientFactory.createSocket(); in testMultithreadedClose() local
338 socket.connect(address); in testMultithreadedClose()
345 InputStream stream = socket.getInputStream(); in testMultithreadedClose()
[all …]
/frameworks/base/tests/DumpRenderTree/src/com/android/dumprendertree/forwarder/
DAdbUtils.java115 Socket socket = new Socket(ADB_HOST, ADB_PORT); in getForwardedSocket() local
117 if(!sendAdbCmd(socket.getInputStream(), socket.getOutputStream(), cmd)) { in getForwardedSocket()
118 socket.close(); in getForwardedSocket()
121 return socket; in getForwardedSocket()
DForwardServer.java86 private ServerSocket socket; field in ForwardServer.ServerRunner
88 public ServerRunner(ServerSocket socket) { in ServerRunner() argument
89 this.socket = socket; in ServerRunner()
95 Socket localSocket = socket.accept(); in run()
DForwarder.java62 private void shutdown(Socket socket) { in shutdown() argument
64 socket.shutdownInput(); in shutdown()
69 socket.shutdownOutput(); in shutdown()
74 socket.close(); in shutdown()
/frameworks/base/tests/BandwidthTests/src/com/android/tests/bandwidthenforcement/
DBandwidthEnforcementTestService.java155 final DatagramSocket socket = new DatagramSocket(); in testDns() local
157 socket.setSoTimeout(10000); in testDns()
162 socket.send(queryPacket); in testDns()
166 socket.receive(replyPacket); in testDns()
170 socket.close(); in testDns()
/frameworks/base/keystore/java/android/security/
DKeyStore.java243 LocalSocket socket = new LocalSocket(); in execute() local
245 socket.connect(sAddress); in execute()
247 OutputStream out = socket.getOutputStream(); in execute()
255 socket.shutdownOutput(); in execute()
257 InputStream in = socket.getInputStream(); in execute()
288 socket.close(); in execute()
/frameworks/base/services/java/com/android/server/
DNativeDaemonConnector.java68 NativeDaemonConnector(INativeDaemonConnectorCallbacks callbacks, String socket, in NativeDaemonConnector() argument
71 mSocket = socket; in NativeDaemonConnector()
108 LocalSocket socket = null; in listenToSocket() local
111 socket = new LocalSocket(); in listenToSocket()
115 socket.connect(address); in listenToSocket()
117 InputStream inputStream = socket.getInputStream(); in listenToSocket()
119 mOutputStream = socket.getOutputStream(); in listenToSocket()
193 if (socket != null) { in listenToSocket()
194 socket.close(); in listenToSocket()
/frameworks/native/opengl/libs/GLES_trace/src/
Dgltrace_transport.cpp35 int serverSocket = socket(AF_LOCAL, SOCK_STREAM, 0); in acceptClientConnection()
94 TCPStream::TCPStream(int socket) { in TCPStream() argument
95 mSocket = socket; in TCPStream()
/frameworks/base/services/jni/
Dcom_android_server_connectivity_Vpn.cpp305 static int bind_to_interface(int socket, const char *name) in bind_to_interface() argument
307 if (setsockopt(socket, SOL_SOCKET, SO_BINDTODEVICE, name, strlen(name))) { in bind_to_interface()
436 static void protect(JNIEnv *env, jobject thiz, jint socket, jstring jName) in protect() argument
443 if (bind_to_interface(socket, name) < 0) { in protect()
464 inet4 = socket(AF_INET, SOCK_DGRAM, 0); in register_android_server_connectivity_Vpn()
467 inet6 = socket(AF_INET6, SOCK_DGRAM, 0); in register_android_server_connectivity_Vpn()
/frameworks/base/docs/html/guide/topics/connectivity/
Dwifip2p.jd477 …<li>Create a {@link java.net.ServerSocket}. This socket waits for a connection from a client on a …
481 the server socket to connect to the server device.</li>
484socket successfully connects to the server socket, you can send data from the client to the server
487 …<li>The server socket waits for a client connection (with the {@link java.net.ServerSocket#accept(…
495 to create this client-server socket communication and transfer JPEG images from a client
514 * Create a server socket and wait for client connections. This
558 …<p>On the client, connect to the server socket with a client socket and transfer data. This example
566 Socket socket = new Socket();
571 * Create a client socket with the host,
574 socket.bind(null);
[all …]
Dbluetooth.jd102 <dd>Represents the interface for a Bluetooth socket (similar to a TCP
108 <dd>Represents an open server socket that listens for incoming requests
110 Android devices, one device must open a server socket with this class. When a
468 you want your application to host a server socket that will accept incoming
478 device must open a server socket and the other one must initiate the connection
498 server, so that each one has a server socket open and listening for connections.
501 a server socket on demand and the other device can simply initiate the
517 socket is to listen for incoming connection requests and when one is accepted,
538 <p>Here's the basic procedure to set up a server socket and accept a
561 registered with this listening server socket. When successful, {@link
[all …]

123