active_ice_controller_factory_interface.h |
|
1738 |
active_ice_controller_interface.h |
|
3614 |
async_stun_tcp_socket.cc |
len |
5721 |
async_stun_tcp_socket.h |
|
2234 |
async_stun_tcp_socket_unittest.cc |
socket |
11764 |
basic_async_resolver_factory.cc |
|
1497 |
basic_async_resolver_factory.h |
|
1346 |
basic_ice_controller.cc |
|
33858 |
basic_ice_controller.h |
|
7728 |
basic_packet_socket_factory.cc |
|
6537 |
basic_packet_socket_factory.h |
|
2351 |
candidate_pair_interface.h |
|
1559 |
connection.cc |
|
68877 |
connection.h |
|
22070 |
connection_info.cc |
|
1301 |
connection_info.h |
|
4563 |
default_ice_transport_factory.cc |
|
1811 |
default_ice_transport_factory.h |
|
1958 |
dtls_transport.h |
|
652 |
dtls_transport_internal.h |
|
688 |
fake_ice_transport.h |
|
598 |
fake_port_allocator.h |
|
602 |
ice_agent_interface.h |
|
3320 |
ice_controller_factory_interface.h |
|
1809 |
ice_controller_interface.cc |
|
788 |
ice_controller_interface.h |
|
6298 |
ice_credentials_iterator.cc |
|
1385 |
ice_credentials_iterator.h |
|
1386 |
ice_credentials_iterator_unittest.cc |
|
1730 |
ice_switch_reason.cc |
|
1868 |
ice_switch_reason.h |
|
1683 |
ice_transport_internal.cc |
|
10119 |
ice_transport_internal.h |
|
19412 |
mock_ice_agent.h |
|
557 |
mock_ice_controller.h |
|
577 |
mock_ice_transport.h |
|
573 |
p2p_constants.cc |
|
3303 |
p2p_constants.h |
|
7372 |
p2p_transport_channel.cc |
|
90571 |
p2p_transport_channel.h |
|
22302 |
p2p_transport_channel_ice_field_trials.h |
|
3232 |
p2p_transport_channel_unittest.cc |
|
316914 |
packet_transport_internal.cc |
opt |
2216 |
packet_transport_internal.h |
|
4899 |
packet_transport_internal_unittest.cc |
|
2090 |
port.cc |
= false |
34569 |
port.h |
|
19708 |
port_allocator.cc |
|
12188 |
port_allocator.h |
|
26943 |
port_allocator_unittest.cc |
|
15283 |
port_interface.cc |
|
580 |
port_interface.h |
|
8547 |
port_unittest.cc |
|
175665 |
pseudo_tcp.cc |
|
43129 |
pseudo_tcp.h |
tstamp(0), |
9546 |
pseudo_tcp_unittest.cc |
|
28918 |
regathering_controller.cc |
|
3244 |
regathering_controller.h |
|
4581 |
regathering_controller_unittest.cc |
pool size |
7481 |
stun_dictionary.cc |
|
12078 |
stun_dictionary.h |
|
7289 |
stun_dictionary_unittest.cc |
|
10610 |
stun_port.cc |
|
23199 |
stun_port.h |
|
9872 |
stun_port_unittest.cc |
|
38271 |
stun_request.cc |
|
11321 |
stun_request.h |
response |
5993 |
stun_request_unittest.cc |
|
8257 |
tcp_port.cc |
This is a diagram of how TCP reconnect works for the active side. The
passive side just waits for an incoming connection.
- Connected: Indicate whether the TCP socket is connected.
- Writable: Whether the stun binding is completed. Sending a data packet
before stun binding completed will trigger IPC socket layer to shutdown
the connection.
- PendingTCP: `connection_pending_` indicates whether there is an
outstanding TCP connection in progress.
- PretendWri: Tracked by `pretending_to_be_writable_`. Marking connection as
WRITE_TIMEOUT will cause the connection be deleted. Instead, we're
"pretending" we're still writable for a period of time such that reconnect
could work.
Data could only be sent in state 3. Sening data during state 2 & 6 will get
EWOULDBLOCK, 4 & 5 EPIPE.
OS Timeout 7 -------------+
+----------------------->|Connected: N |
| |Writable: N | Timeout
| Timeout |Connection is |<----------------+
| +------------------->|Dead | |
| | +--------------+ |
| | ^ |
| | OnClose | |
| | +-----------------------+ | |
| | | | |Timeout |
| | v | | |
| 4 +----------+ 5 -----+--+--+ 6 -----+-----+
| |Connected: N|Send() or |Connected: N| |Connected: Y|
| |Writable: Y|Ping() |Writable: Y|OnConnect |Writable: Y|
| |PendingTCP:N+--------> |PendingTCP:Y+---------> |PendingTCP:N|
| |PretendWri:Y| |PretendWri:Y| |PretendWri:Y|
| +-----+------+ +------------+ +---+--+-----+
| ^ ^ | |
| | | OnClose | |
| | +----------------------------------------------+ |
| | |
| | Stun Binding Completed |
| | |
| | OnClose |
| +------------------------------------------------+ |
| | v
1 -----------+ 2 -----------+Stun 3 -----------+
|Connected: N| |Connected: Y|Binding |Connected: Y|
|Writable: N|OnConnect |Writable: N|Completed |Writable: Y|
|PendingTCP:Y+---------> |PendingTCP:N+--------> |PendingTCP:N|
|PretendWri:N| |PretendWri:N| |PretendWri:N|
+------------+ +------------+ +------------+
|
25163 |
tcp_port.h |
|
7314 |
tcp_port_unittest.cc |
|
18552 |
transport_description.cc |
renomination= |
6315 |
transport_description.h |
|
5754 |
transport_description_factory.cc |
|
5989 |
transport_description_factory.h |
|
3907 |
transport_description_factory_unittest.cc |
|
16452 |
transport_description_unittest.cc |
|
2033 |
transport_info.h |
|
1500 |
turn_port.cc |
|
69133 |
turn_port.h |
|
14336 |
turn_port_unittest.cc |
|
94425 |
wrapping_active_ice_controller.cc |
|
8511 |
wrapping_active_ice_controller.h |
|
4349 |
wrapping_active_ice_controller_unittest.cc |
|
12265 |