History log of /system/core/libcutils/socket_network_client_unix.c
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
9b7341fe57ee9e4e95b111a14966107b3f0582d0 22-Sep-2016 Tao Wu <lepton@google.com> We should break from loop after getting connected.

Now it always connects to multiple address of same host and just
return one socket while other sockets get leaked.

Also, it cause trouble on machine with dual stack.
adb connect localhost:* just connect to IPv4 and IPv6 at same time
and finally it doesn't work since emulator can only handle one adb
connection.

To test this, start an emulator with non-standar port and killall adb
daemon on linux work station and then do following test.

Test: adb connect localhost:12345;lsof -n -p `pgrep adb`
Change-Id: I1e0f6824efc1db8e179377de068e3b5535aff3f7
/system/core/libcutils/socket_network_client_unix.c
78cc20f00730c5f017550bec2e494523bc052c42 01-Sep-2016 Josh Gao <jmgao@google.com> libcutils: try all addresses in socket_network_client_timeout.

If a connection fails to an address that resolves to multiple
sockaddrs, attempt connecting to subsequent addresses if the initial
connection fails to a reason other than timeout. This is primarily
useful for localhost, which can resolve to both an IPv4 and and IPv6
address.

Also, add an adb test to verify that this behavior.

Bug: http://b/30313466
Change-Id: Ib2df706a66cf6ef8c1097fdfd7aedb69b8df2d6e
Test: python test_adb.py (+ the test fails before this patch)
/system/core/libcutils/socket_network_client_unix.c
0eb8e1b706b577194bab1e23fab5b7d20d5259f1 15-Jan-2016 David Pursell <dpursell@google.com> libcutils: share Windows networking code.

This CL moves Windows networking code from fastboot to libcutils so
that it can be shared with other host programs such as adb.

Not all libcutils networking functions have been implemented for
Windows, just those necessary for fastboot. In the next CL I will do
the same for adb, adding any additional required functions.

Unit tests have also been added to test the functions using a loopback
connection.

Bug: http://b/26236380.
Change-Id: Ibc51a67030fe69a04c23512eefa9d19b055c7c12
/system/core/libcutils/socket_network_client_unix.c