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

12

/development/tools/axl/
H A DudpEater.py24 import time, socket, string namespace
29 svrsocket = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
30 svrsocket.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1)
33 hostname = socket.gethostname()
34 ip = socket.gethostbyname(hostname)
H A DudpServer.py2 import time, socket, string namespace
9 svrsocket = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
10 svrsocket.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1)
13 # hostname = socket.gethostname()
15 ip = socket.gethostbyname(hostname)
/development/samples/WiFiDirectServiceDiscovery/src/com/example/android/wifidirect/discovery/
H A DClientSocketHandler.java26 Socket socket = new Socket();
28 socket.bind(null);
29 socket.connect(new InetSocketAddress(mAddress.getHostAddress(),
32 chat = new ChatManager(socket, handler);
37 socket.close();
H A DChatManager.java13 * Handles reading and writing of messages with socket buffers. Uses a Handler
18 private Socket socket = null; field in class:ChatManager
21 public ChatManager(Socket socket, Handler handler) { argument
22 this.socket = socket;
34 iStream = socket.getInputStream();
35 oStream = socket.getOutputStream();
61 socket.close();
H A DGroupOwnerSocketHandler.java19 ServerSocket socket = null; field in class:GroupOwnerSocketHandler
26 socket = new ServerSocket(4545);
50 pool.execute(new ChatManager(socket.accept(), handler));
55 if (socket != null && !socket.isClosed())
56 socket.close();
/development/tools/emulator/system/libqemu/
H A Dtest_util.c17 #include <sys/socket.h>
50 pipe->socket = -1;
52 fd = socket( AF_INET, SOCK_STREAM, 0 );
54 fprintf(stderr, "%s: Can't create socket!!\n", __FUNCTION__);
70 pipe->socket = fd;
77 pipe->socket = qemu_pipe_open(pipename);
78 if (pipe->socket < 0) {
91 ret = write(pipe->socket, ptr, bufflen);
114 ret = read(pipe->socket, buff, bufflen);
133 if (pipe->socket >
[all...]
H A Dtest_util.h26 int socket; member in struct:__anon595
H A Dtest_host_2.c23 #include <sys/socket.h>
45 /* Close a socket, preserving the value of errno */
54 /* Create a server socket bound to a loopback port */
60 int sock = socket(AF_INET, type, 0);
H A Dtest_host_1.c23 #include <sys/socket.h>
34 #define DEFAULT_PATH "/tmp/libqemu-socket"
47 /* Close a socket, preserving the value of errno */
56 /* Create a server socket bound to a loopback port */
62 int sock = socket(AF_INET, type, 0);
95 int sock = socket(AF_UNIX, type, 0);
134 " -unix <path> Use unix server socket\n"
/development/samples/WiFiDirectDemo/src/com/example/android/wifidirect/
H A DFileTransferService.java21 * socket connection with the WiFi Direct Group Owner and writing the file
50 Socket socket = new Socket();
54 Log.d(WiFiDirectActivity.TAG, "Opening client socket - ");
55 socket.bind(null);
56 socket.connect((new InetSocketAddress(host, port)), SOCKET_TIMEOUT);
58 Log.d(WiFiDirectActivity.TAG, "Client socket - " + socket.isConnected());
59 OutputStream stream = socket.getOutputStream();
72 if (socket != null) {
73 if (socket
[all...]
/development/samples/USB/AdbTest/src/com/android/adb/
H A DAdbDevice.java118 AdbSocket socket;
121 socket = new AdbSocket(this, id);
122 mSockets.put(id, socket);
124 if (socket.open(destination)) {
125 return socket;
137 public void socketClosed(AdbSocket socket) { argument
139 mSockets.remove(socket.getId());
178 AdbSocket socket = getSocket(message.getArg1());
179 if (socket == null) {
180 log("ERROR socket no
[all...]
/development/ndk/platforms/android-3/include/linux/
H A Dnet.h16 #include <asm/socket.h>
H A Dipx.h15 #include <linux/socket.h>
H A Dnetlink.h15 #include <linux/socket.h>
/development/ndk/platforms/android-3/include/netinet/
H A Din.h32 #include <linux/socket.h>
/development/ndk/platforms/android-3/include/
H A Dresolv.h34 #include <sys/socket.h>
/development/samples/BluetoothChat/src/com/example/android/BluetoothChat/
H A DBluetoothChatService.java45 // Name for the SDP record when creating server socket
148 * @param socket The BluetoothSocket on which the connection was made
151 public synchronized void connected(BluetoothSocket socket, BluetoothDevice argument
172 mConnectedThread = new ConnectedThread(socket, socketType);
266 // The local server socket
274 // Create a new listening server socket
294 BluetoothSocket socket = null;
296 // Listen to the server socket if we're not connected
301 socket = mmServerSocket.accept();
308 if (socket !
427 ConnectedThread(BluetoothSocket socket, String socketType) argument
[all...]
/development/ndk/platforms/android-3/include/net/
H A Dif_dl.h55 #include <sys/socket.h>
/development/samples/KeyChainDemo/src/com/example/android/keychain/
H A DSecureWebServer.java77 // Create the SSL server socket factory
99 // Create the secure server socket
110 Socket socket = sss.accept();
116 new InputStreamReader(socket.getInputStream()));
117 PrintWriter out = new PrintWriter(socket
137 socket.close();
155 // Close the socket
/development/ndk/platforms/android-3/include/sys/
H A Dsocket.h33 #include <linux/socket.h>
63 __socketcall int socket(int, int, int);
/development/ndk/platforms/android-9/arch-mips/include/sys/
H A Dsocket.h33 #include <linux/socket.h>
73 __socketcall int socket(int, int, int);
/development/apps/Development/src/com/android/development/
H A DLogViewer.java77 final Socket socket; field in class:LogViewer.LogReader
85 this.socket = new Socket("127.0.0.1", 5040);
86 this.in = new DataInputStream(this.socket.getInputStream());
88 this.socket.getOutputStream().write('\n');
89 this.socket.getOutputStream().write('\n');
/development/samples/training/NsdChat/src/com/example/android/nsdchat/
H A DChatConnection.java95 private synchronized void setSocket(Socket socket) { argument
97 if (socket == null) {
98 Log.d(TAG, "Setting a null socket.");
110 mSocket = socket;
131 Log.e(TAG, "Error when closing server socket.");
198 Log.d(CLIENT_TAG, "Client-side socket initialized.");
208 Log.d(CLIENT_TAG, "Initializing socket failed, UHE", e);
210 Log.d(CLIENT_TAG, "Initializing socket failed, IOE.", e);
257 Log.e(CLIENT_TAG, "Error when closing server socket.");
263 Socket socket
[all...]
/development/ndk/platforms/android-3/include/linux/sunrpc/
H A Dxprt.h16 #include <linux/socket.h>
96 struct socket * sock;
/development/samples/ToyVpn/server/linux/
H A DToyVpnServer.cpp24 #include <sys/socket.h>
86 // We use an IPv6 socket to cover both IPv4 and IPv6.
87 int tunnel = socket(AF_INET6, SOCK_DGRAM, 0);

Completed in 508 milliseconds

12