active_ice_controller_factory_interface.h |
|
1668 |
active_ice_controller_interface.h |
|
3302 |
async_stun_tcp_socket.cc |
len |
5742 |
async_stun_tcp_socket.h |
|
2145 |
async_stun_tcp_socket_unittest.cc |
socket |
11788 |
basic_async_resolver_factory.cc |
|
1497 |
basic_async_resolver_factory.h |
|
1346 |
basic_ice_controller.cc |
|
33883 |
basic_ice_controller.h |
|
7454 |
basic_packet_socket_factory.cc |
|
6547 |
basic_packet_socket_factory.h |
|
2263 |
candidate_pair_interface.h |
|
1254 |
connection.cc |
|
68875 |
connection.h |
|
21791 |
connection_info.cc |
|
1303 |
connection_info.h |
|
4226 |
default_ice_transport_factory.cc |
|
1884 |
default_ice_transport_factory.h |
|
1988 |
dtls_transport.h |
|
652 |
dtls_transport_internal.h |
|
688 |
fake_ice_transport.h |
|
598 |
fake_port_allocator.h |
|
602 |
ice_agent_interface.h |
|
3013 |
ice_controller_factory_interface.h |
|
1750 |
ice_controller_interface.cc |
|
782 |
ice_controller_interface.h |
|
5932 |
ice_credentials_iterator.cc |
|
1348 |
ice_credentials_iterator.h |
|
1064 |
ice_credentials_iterator_unittest.cc |
|
1728 |
ice_switch_reason.cc |
|
1870 |
ice_switch_reason.h |
|
1327 |
ice_transport_internal.cc |
|
10311 |
ice_transport_internal.h |
|
18818 |
mock_ice_agent.h |
|
557 |
mock_ice_controller.h |
|
577 |
mock_ice_transport.h |
|
573 |
p2p_constants.cc |
|
3305 |
p2p_constants.h |
|
5141 |
p2p_transport_channel.cc |
|
91179 |
p2p_transport_channel.h |
|
22533 |
p2p_transport_channel_ice_field_trials.h |
|
2918 |
p2p_transport_channel_unittest.cc |
|
326218 |
packet_transport_internal.cc |
opt |
2208 |
packet_transport_internal.h |
|
4650 |
packet_transport_internal_unittest.cc |
|
2040 |
port.cc |
= false |
35133 |
port.h |
|
19562 |
port_allocator.cc |
|
12334 |
port_allocator.h |
|
26993 |
port_allocator_unittest.cc |
|
15308 |
port_interface.cc |
|
580 |
port_interface.h |
|
8649 |
port_unittest.cc |
|
178830 |
pseudo_tcp.cc |
|
43212 |
pseudo_tcp.h |
tstamp(0), |
9211 |
pseudo_tcp_unittest.cc |
|
28800 |
regathering_controller.cc |
|
3244 |
regathering_controller.h |
|
4605 |
regathering_controller_unittest.cc |
pool size |
7550 |
stun_dictionary.cc |
|
12519 |
stun_dictionary.h |
|
6949 |
stun_dictionary_unittest.cc |
|
10634 |
stun_port.cc |
|
24387 |
stun_port.h |
|
12231 |
stun_port_unittest.cc |
|
38036 |
stun_request.cc |
|
11383 |
stun_request.h |
response |
5611 |
stun_request_unittest.cc |
|
8316 |
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|
+------------+ +------------+ +------------+
|
25396 |
tcp_port.h |
|
8223 |
tcp_port_unittest.cc |
|
18190 |
transport_description.cc |
renomination= |
6404 |
transport_description.h |
|
4996 |
transport_description_factory.cc |
|
6004 |
transport_description_factory.h |
|
3619 |
transport_description_factory_unittest.cc |
|
16427 |
transport_description_unittest.cc |
|
2035 |
transport_info.h |
|
1155 |
turn_port.cc |
|
72406 |
turn_port.h |
|
16064 |
turn_port_unittest.cc |
|
95704 |
wrapping_active_ice_controller.cc |
|
8566 |
wrapping_active_ice_controller.h |
|
4070 |
wrapping_active_ice_controller_unittest.cc |
|
12273 |