Cast: UDP socket operation should be more resilient
commit41b34c71dce06571c39c42f08ff5e1d42ccaed69
authorhclam@chromium.org <hclam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>
Thu, 31 Jul 2014 00:06:02 +0000 (31 00:06 +0000)
committerhclam@chromium.org <hclam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>
Thu, 31 Jul 2014 00:06:02 +0000 (31 00:06 +0000)
tree681f36ec7aa10b49c5a5a156a81f3c4ee328f3dd
parent190d63da06860afe46bf74854fb52caecd278eac
Cast: UDP socket operation should be more resilient

UDP socket has transient errors. In cast if we have an unsuccessful
read followed by an unsuccessful write then socket reading will stop.
This can cause the stream to be stopped until there is a successful
send again.

We should ignore any UDP socket errors and keep going.

Also changed the code location such that we start receiving
packets when CastTransportSender is created.

Testing

This change interacts directly with system UDP sockets so
it is not mockable. Instead I tested this locally with
streaming went smoothly.

BUG=396138

Review URL: https://codereview.chromium.org/409163003

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@286646 0039d316-1c4b-4281-b951-d872f2087c98
media/cast/net/cast_transport_sender_impl.cc
media/cast/net/cast_transport_sender_impl.h
media/cast/net/udp_transport.cc