From 7136b053b7fc7840ec64e01d1d19ab822e1f949a Mon Sep 17 00:00:00 2001 From: Vladimir Chtchetkine Date: Tue, 10 Apr 2012 13:39:24 -0700 Subject: Use new SdkController communication protocol for emulation ports android/sdk-control-socket.* has replaced android/android-device.* as the back-bone of communicating with SDK controller on the device. The major differences are: - New communication protocol uses just one (async) socket connection to communicate with the device (the old one used two sockets: one sync, and another - async). - New communication protocol connects to one TCP port (1970 in this CL) for all emulation ports. Channel multiplexing is done by using port names, and assigning a separate socket for communication inside each separate port. The old protocol had separate TCP ports for each emulation ports (1968 for sensors, and 1969 for multi-touch) Change-Id: I779fcbdfba2f9b4c433a9d76a567975708b00469 --- android/async-socket.h | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'android/async-socket.h') diff --git a/android/async-socket.h b/android/async-socket.h index 503907b..bdfd272 100644 --- a/android/async-socket.h +++ b/android/async-socket.h @@ -17,7 +17,9 @@ #ifndef ANDROID_ASYNC_SOCKET_H_ #define ANDROID_ASYNC_SOCKET_H_ +#include "qemu-common.h" #include "android/async-io-common.h" +#include "android/async-utils.h" /* * Contains declaration of an API that encapsulates communication via an @@ -264,4 +266,10 @@ extern void* async_socket_get_client_opaque(const AsyncSocket* as); /* Gets TCP port for the socket. */ extern int async_socket_get_port(const AsyncSocket* as); +/* Checks if socket is connected. + * Return: + * Boolean: 1 - socket is connected, 0 - socket is not connected. + */ +extern int async_socket_is_connected(const AsyncSocket* as); + #endif /* ANDROID_ASYNC_SOCKET_H_ */ -- cgit v1.1