diff options
| author | Ken Lierman <ken.lierman@windriver.com> | 2013-06-20 09:27:13 -0700 |
|---|---|---|
| committer | Elliott Hughes <enh@google.com> | 2014-05-19 16:16:42 -0700 |
| commit | aecc6a6657746afc9b95a960eedad10484bf14ac (patch) | |
| tree | 892ed6eb7017161b3d6e81d53c4dc4edbd07d7e4 /include | |
| parent | f03bd9537b77f996cddd562d88558151d3d6c7fd (diff) | |
| download | system_core-aecc6a6657746afc9b95a960eedad10484bf14ac.tar.gz system_core-aecc6a6657746afc9b95a960eedad10484bf14ac.tar.bz2 system_core-aecc6a6657746afc9b95a960eedad10484bf14ac.zip | |
Bound the ADB connect time with a non-blocking connect
After a disconnect, the initial blocking connect takes
a long time to return, while subsequent calls return
quicks. Switch to a non-blocking connect to make the
re-connect time more consistent and faster overall.
Change-Id: I21d02b22a8eb9a457c2f1fa95eb17894d5612ccd
Signed-off-by: Ken Lierman <ken.lierman@windriver.com>
Reviewed-by: Gumbel, Matthew K <matthew.k.gumbel@intel.com>
Reviewed-by: Jovanovic, Radivoje <radivoje.jovanovic@intel.com>
Reviewed-by: Boie, Andrew P <andrew.p.boie@intel.com>
Diffstat (limited to 'include')
| -rw-r--r-- | include/cutils/sockets.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/include/cutils/sockets.h b/include/cutils/sockets.h index 19cae0c3b..daf43ec94 100644 --- a/include/cutils/sockets.h +++ b/include/cutils/sockets.h @@ -86,6 +86,8 @@ static inline int android_get_control_socket(const char *name) extern int socket_loopback_client(int port, int type); extern int socket_network_client(const char *host, int port, int type); +extern int socket_network_client_timeout(const char *host, int port, int type, + int timeout); extern int socket_loopback_server(int port, int type); extern int socket_local_server(const char *name, int namespaceId, int type); extern int socket_local_server_bind(int s, const char *name, int namespaceId); |
