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

Method receive_answer_from_connection

runners/BaseRunner.cpp:1026–1038  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1024}
1025
1026void BaseRunner::receive_answer_from_connection(TcpClient::ConnectionId connection_id,
1027 td::Result<td::BufferSlice> result,
1028 td::Promise<td::BufferSlice> promise) {
1029 LOG(DEBUG) << "received answer from connection " << connection_id;
1030 auto it = all_connections_.find(connection_id);
1031 if (it == all_connections_.end()) {
1032 LOG(WARNING) << "received answer from unknown connection " << connection_id;
1033 return promise.set_error(td::Status::Error(ton::ErrorCode::cancelled, "connection is destroyed"));
1034 }
1035 it->second->received_answer();
1036
1037 promise.set_result(std::move(result));
1038}
1039
1040/*
1041 *

Callers

nothing calls this directly

Calls 2

set_errorMethod · 0.80
received_answerMethod · 0.45

Tested by

no test coverage detected