| 131 | */ |
| 132 | |
| 133 | void ProxyTarget::connected(TcpClient::ConnectionId connection_id) { |
| 134 | if (connection_id_ == connection_id) { |
| 135 | return; |
| 136 | } |
| 137 | close_connection(); |
| 138 | connection_id_ = connection_id; |
| 139 | switch (status_) { |
| 140 | case ProxyTargetStatus::Connecting: |
| 141 | status_ = ProxyTargetStatus::RunningInitialHandshake; |
| 142 | last_status_change_at_ = td::Timestamp::now(); |
| 143 | break; |
| 144 | case ProxyTargetStatus::RunningInitialHandshake: |
| 145 | break; |
| 146 | case ProxyTargetStatus::Reconnecting: |
| 147 | status_ = ProxyTargetStatus::RunningReconnectHandshake; |
| 148 | last_status_change_at_ = td::Timestamp::now(); |
| 149 | break; |
| 150 | case ProxyTargetStatus::RunningReconnectHandshake: |
| 151 | break; |
| 152 | case ProxyTargetStatus::Ready: |
| 153 | break; |
| 154 | } |
| 155 | } |
| 156 | |
| 157 | void ProxyTarget::connection_is_ready(TcpClient::ConnectionId connection_id) { |
| 158 | if (connection_id_ != connection_id) { |
no outgoing calls
no test coverage detected