webrtc/p2p/base
Steve Anton 3fa2b80e14 AsyncTCPSocket: try sending outgoing data until EWOULDBLOCK
The AsyncTCPSocket is an AsyncPacketSocket which means it
emulates UDP-like (packet) semantics via a TCP stream. When
sending, if the entire packet could not be written then the
packet socket should indicate it wrote the whole thing and
flush out the remaining later when the socket is available.

The WriteEvent signal was already wired up but was not getting
fired (at least with the virtual sockets) since it would not
call Send() enough on the underlying socket to get an
EWOULDBLOCK that would register the async event.

This changes AsyncTCPSocket to repeatedly call Send() on the
underlying socket until the entire packet has been written
or EWOULDBLOCK was returned.

Bug: webrtc:6655
Change-Id: I41e81e0c106c9b3e712a8a0f792d28745d93f2d2
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/168083
Reviewed-by: Qingsi Wang <qingsi@webrtc.org>
Commit-Queue: Steve Anton <steveanton@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#30449}
2020-02-03 21:19:57 +00:00
..
async_stun_tcp_socket_unittest.cc AsyncTCPSocket: try sending outgoing data until EWOULDBLOCK 2020-02-03 21:19:57 +00:00
async_stun_tcp_socket.cc Move stun.h to api/. 2019-11-18 16:11:27 +00:00
async_stun_tcp_socket.h (4) Rename files to snake_case: update BUILD.gn, include paths, header guards, and DEPS entries 2019-01-11 17:11:39 +00:00
basic_async_resolver_factory_unittest.cc Fully qualify googletest symbols. 2019-04-09 17:18:20 +00:00
basic_async_resolver_factory.cc (4) Rename files to snake_case: update BUILD.gn, include paths, header guards, and DEPS entries 2019-01-11 17:11:39 +00:00
basic_async_resolver_factory.h (4) Rename files to snake_case: update BUILD.gn, include paths, header guards, and DEPS entries 2019-01-11 17:11:39 +00:00
basic_ice_controller.cc Add IceControllerEvent::ICE_CONTROLLER_RECHECK 2019-12-03 10:17:09 +00:00
basic_ice_controller.h make Connection::port() protected 2019-11-27 11:13:48 +00:00
basic_packet_socket_factory.cc Prepare to move packet_socket_factory to api/. 2019-09-06 09:09:02 +00:00
basic_packet_socket_factory.h Prepare to move packet_socket_factory to api/. 2019-09-06 09:09:02 +00:00
candidate_pair_interface.h (4) Rename files to snake_case: update BUILD.gn, include paths, header guards, and DEPS entries 2019-01-11 17:11:39 +00:00
connection_info.cc Move Connection into it's own .h/.cc file. 2019-05-29 11:27:47 +00:00
connection_info.h Move Connection into it's own .h/.cc file. 2019-05-29 11:27:47 +00:00
connection.cc Remove iceRegatherIntervalRange 2020-01-28 19:16:18 +00:00
connection.h STUN PING request 2019-12-11 14:23:30 +00:00
default_ice_transport_factory.cc Make IceController injectable 2019-11-22 19:45:32 +00:00
default_ice_transport_factory.h Make ICE transports injectable. 2019-11-15 21:31:19 +00:00
dtls_transport_factory.h Make ICE transports injectable. 2019-11-15 21:31:19 +00:00
dtls_transport_internal.cc Datagram Transport Integration 2019-05-23 23:36:05 +00:00
dtls_transport_internal.h Implement crypto stats on DTLS transport 2019-10-28 11:30:23 +00:00
dtls_transport_unittest.cc Use std::make_unique instead of absl::make_unique. 2019-09-17 15:47:29 +00:00
dtls_transport.cc Improve DTLS logging. 2020-01-16 12:28:11 +00:00
dtls_transport.h Implement crypto stats on DTLS transport 2019-10-28 11:30:23 +00:00
fake_dtls_transport.h Make SCTPtransport enter "closed" state when DTLStransport does. 2019-11-16 14:56:01 +00:00
fake_ice_transport.h Make ICE transports injectable. 2019-11-15 21:31:19 +00:00
fake_packet_transport.h Create a composite implementation of RtpTransportInternal. 2019-05-28 23:18:49 +00:00
fake_port_allocator.h Remove iceRegatherIntervalRange 2020-01-28 19:16:18 +00:00
ice_controller_factory_interface.h Make IceController injectable 2019-11-22 19:45:32 +00:00
ice_controller_interface.cc Add IceControllerEvent::ICE_CONTROLLER_RECHECK 2019-12-03 10:17:09 +00:00
ice_controller_interface.h Add IceControllerEvent::ICE_CONTROLLER_RECHECK 2019-12-03 10:17:09 +00:00
ice_credentials_iterator_unittest.cc Format almost everything. 2019-07-08 13:45:15 +00:00
ice_credentials_iterator.cc (4) Rename files to snake_case: update BUILD.gn, include paths, header guards, and DEPS entries 2019-01-11 17:11:39 +00:00
ice_credentials_iterator.h (4) Rename files to snake_case: update BUILD.gn, include paths, header guards, and DEPS entries 2019-01-11 17:11:39 +00:00
ice_transport_internal.cc (4) Rename files to snake_case: update BUILD.gn, include paths, header guards, and DEPS entries 2019-01-11 17:11:39 +00:00
ice_transport_internal.h Remove iceRegatherIntervalRange 2020-01-28 19:16:18 +00:00
mdns_message_unittest.cc Format almost everything. 2019-07-08 13:45:15 +00:00
mdns_message.cc Format almost everything. 2019-07-08 13:45:15 +00:00
mdns_message.h Format almost everything. 2019-07-08 13:45:15 +00:00
mock_async_resolver.h (4) Rename files to snake_case: update BUILD.gn, include paths, header guards, and DEPS entries 2019-01-11 17:11:39 +00:00
mock_ice_transport.h Add support for RTCTransportStats.selectedCandidatePairChanges 2019-08-28 13:22:08 +00:00
p2p_constants.cc Stop pairing local relay candidates with remote mDNS candidates. 2019-10-18 23:36:17 +00:00
p2p_constants.h Stop pairing local relay candidates with remote mDNS candidates. 2019-10-18 23:36:17 +00:00
p2p_transport_channel_ice_field_trials.h GOOG_PING: improve handshake 2020-01-15 16:09:38 +00:00
p2p_transport_channel_unittest.cc Remove iceRegatherIntervalRange 2020-01-28 19:16:18 +00:00
p2p_transport_channel.cc Remove iceRegatherIntervalRange 2020-01-28 19:16:18 +00:00
p2p_transport_channel.h Make IceController injectable 2019-11-22 19:45:32 +00:00
packet_transport_internal.cc Delete the remaining ORTC interfaces. 2019-05-24 18:17:37 +00:00
packet_transport_internal.h Stop an SCTP connection when the DTLS transport closes. 2019-12-16 14:54:56 +00:00
port_allocator_unittest.cc Add a turn port prune policy to keep the first ready turn port. 2019-10-14 19:08:23 +00:00
port_allocator.cc Delete gturn support 2019-11-04 08:31:07 +00:00
port_allocator.h Remove iceRegatherIntervalRange 2020-01-28 19:16:18 +00:00
port_interface.cc (4) Rename files to snake_case: update BUILD.gn, include paths, header guards, and DEPS entries 2019-01-11 17:11:39 +00:00
port_interface.h Move SendBindingResponse to Connection 2019-11-29 16:32:14 +00:00
port_unittest.cc TCPConnection: Defer FailAndPrune by signaling to self 2020-01-28 09:50:06 +00:00
port.cc Remove iceRegatherIntervalRange 2020-01-28 19:16:18 +00:00
port.h Replace hostCandidate with address and port in RTCPeerConnectionIceErrorEvent 2019-12-04 13:18:22 +00:00
pseudo_tcp_unittest.cc Cleanup: Removes redundant includes on message_queue.h 2020-01-08 14:12:08 +00:00
pseudo_tcp.cc In rtc::ByteBuffer drop support for ORDER_HOST as unused 2019-11-15 11:48:42 +00:00
pseudo_tcp.h Format almost everything. 2019-07-08 13:45:15 +00:00
regathering_controller_unittest.cc Remove iceRegatherIntervalRange 2020-01-28 19:16:18 +00:00
regathering_controller.cc Remove iceRegatherIntervalRange 2020-01-28 19:16:18 +00:00
regathering_controller.h Remove iceRegatherIntervalRange 2020-01-28 19:16:18 +00:00
stun_port_unittest.cc Replace hostCandidate with address and port in RTCPeerConnectionIceErrorEvent 2019-12-04 13:18:22 +00:00
stun_port.cc Replace hostCandidate with address and port in RTCPeerConnectionIceErrorEvent 2019-12-04 13:18:22 +00:00
stun_port.h Format almost everything. 2019-07-08 13:45:15 +00:00
stun_request_unittest.cc Format almost everything. 2019-07-08 13:45:15 +00:00
stun_request.cc Remove iceRegatherIntervalRange 2020-01-28 19:16:18 +00:00
stun_request.h Cleanup: Removes redundant includes on message_queue.h 2020-01-08 14:12:08 +00:00
stun_server_unittest.cc Format almost everything. 2019-07-08 13:45:15 +00:00
stun_server.cc Stun server should return XOR-MAPPED-ADDRESS/MAPPED-ADDRESS correctly 2019-06-28 19:12:14 +00:00
stun_server.h Move stun.h to api/. 2019-11-18 16:11:27 +00:00
tcp_port_unittest.cc Format almost everything. 2019-07-08 13:45:15 +00:00
tcp_port.cc TCPConnection: Defer FailAndPrune by signaling to self 2020-01-28 09:50:06 +00:00
tcp_port.h TCPConnection: Defer FailAndPrune by signaling to self 2020-01-28 09:50:06 +00:00
test_stun_server.cc Stun server should return XOR-MAPPED-ADDRESS/MAPPED-ADDRESS correctly 2019-06-28 19:12:14 +00:00
test_stun_server.h Move stun.h to api/. 2019-11-18 16:11:27 +00:00
test_turn_customizer.h Use std::make_unique instead of absl::make_unique. 2019-09-17 15:47:29 +00:00
test_turn_server.h Move stun.h to api/. 2019-11-18 16:11:27 +00:00
transport_description_factory_unittest.cc Allow non-identical datagram transport parameters. 2020-01-29 18:14:24 +00:00
transport_description_factory.cc Allow non-identical datagram transport parameters. 2020-01-29 18:14:24 +00:00
transport_description_factory.h Reland: Implement true negotiation for DatagramTransport with fallback to RTP. 2019-06-07 20:14:36 +00:00
transport_description_unittest.cc Validate ICE ufrag/pwd according to the spec 2020-01-25 01:38:50 +00:00
transport_description.cc Validate ICE ufrag/pwd according to the spec 2020-01-25 01:38:50 +00:00
transport_description.h Export IceParameters::Parse for use in Chrome 2020-01-28 01:46:04 +00:00
transport_info.h (4) Rename files to snake_case: update BUILD.gn, include paths, header guards, and DEPS entries 2019-01-11 17:11:39 +00:00
turn_port_unittest.cc Replace hostCandidate with address and port in RTCPeerConnectionIceErrorEvent 2019-12-04 13:18:22 +00:00
turn_port.cc Concatenate string literals at compile time. 2020-01-14 14:47:48 +00:00
turn_port.h Add TURN_LOGGING_ID 2019-08-27 07:18:00 +00:00
turn_server_unittest.cc Fully qualify googletest symbols. 2019-04-09 17:18:20 +00:00
turn_server.cc Move stun.h to api/. 2019-11-18 16:11:27 +00:00
turn_server.h Cleanup: Removes redundant includes on message_queue.h 2020-01-08 14:12:08 +00:00
udp_port.h (4) Rename files to snake_case: update BUILD.gn, include paths, header guards, and DEPS entries 2019-01-11 17:11:39 +00:00