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

Method tls_solved_pow

net/TcpConnection.cpp:99–112  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

97}
98
99void TcpConnection::tls_solved_pow(td::SocketPipe pipe) {
100 td::connect(
101 [self = actor_id(this)](td::Result<std::pair<td::Pipe, RATLSAttestedPeerInfo>> R) {
102 if (R.is_ok()) {
103 auto res = R.move_as_ok();
104 td::actor::send_closure(self, &TcpConnection::tls_created_pipe, std::move(res.first), res.second.report());
105 } else {
106 td::actor::send_closure(self, &TcpConnection::fail,
107 R.move_as_error_prefix("tcp: failed to create tls connection: "));
108 }
109 },
110 wrap_tls_client("conn", std::move(pipe), type_->type.get<TcpConnectionTls>().cert_and_key,
111 type_->type.get<TcpConnectionTls>().policy, td::IPAddress{}, td::IPAddress{}));
112}
113
114void TcpConnection::tls_created_pipe(td::Pipe pipe, const RATLSAttestationReport &report) {
115 process_attestation(report);

Callers

nothing calls this directly

Calls 1

wrap_tls_clientFunction · 0.85

Tested by

no test coverage detected