fastboot: add Socket timeout detection.
UDP fastboot will require re-transmission in the case of datagrams
getting lost. This CL adds Socket functionality to easily distinguish
between a normal timeout and a socket failure.
I also found some Windows docs that indicate sockets may become
invalid after a call to recv() times out. This has never occurred in
my testing, but to be safe this switches the timeout implementation
to use select() instead of SO_RCVTIMEO.
Bug: http://b/26154914
(cherry picked from commit c742a7f17475e22739c09a5b19862b8d1ec6050a)
Change-Id: I339d42fc40d853ee48d1b457d06b67faf5799d91
5 files changed