MCPcopy Create free account
hub / github.com/TelegramMessenger/cocoon / connected

Method connected

runners/BaseRunner.cpp:133–155  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

131 */
132
133void 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
157void ProxyTarget::connection_is_ready(TcpClient::ConnectionId connection_id) {
158 if (connection_id_ != connection_id) {

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected