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

Method send_auth_success

runners/proxy/ProxyInboundClientConnection.cpp:157–164  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

155}
156
157void ProxyInboundClientConnection::send_auth_success(td::Promise<td::BufferSlice> promise) {
158 state_ = State::Ok;
159 handshake_completed();
160 runner()->sign_client_payment(*client_info_);
161 promise.set_value(cocoon::create_serialize_tl_object<cocoon_api::client_authorizationWithProxySuccess>(
162 client_info_->signed_payment(), client_info_->tokens_committed_to_db(), client_info_->tokens_max()));
163 remove_connecting_info();
164}
165
166void ProxyInboundClientConnection::send_auth_fail(td::Status error, td::Promise<td::BufferSlice> promise) {
167 promise.set_value(cocoon::create_serialize_tl_object<cocoon_api::client_authorizationWithProxyFailed>(

Callers

nothing calls this directly

Calls 4

sign_client_paymentMethod · 0.80
signed_paymentMethod · 0.45
tokens_maxMethod · 0.45

Tested by

no test coverage detected