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

Method send_query_to_proxy

runners/BaseRunner.cpp:954–964  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

952 */
953
954void BaseRunner::send_query_to_proxy(std::string name, td::BufferSlice data, td::Timestamp timeout,
955 td::Promise<td::BufferSlice> promise) {
956 for (auto &x : proxy_targets_) {
957 if (x.second->is_ready()) {
958 send_query_to_connection(x.second->connection_id(), std::move(name), std::move(data), timeout,
959 std::move(promise));
960 return;
961 }
962 }
963 promise.set_error(td::Status::Error(ton::ErrorCode::notready, "No proxy connections"));
964}
965
966void BaseRunner::send_query_to_connection(TcpClient::ConnectionId connection_id, std::string name, td::BufferSlice data,
967 td::Timestamp timeout, td::Promise<td::BufferSlice> promise) {

Callers

nothing calls this directly

Calls 3

set_errorMethod · 0.80
is_readyMethod · 0.45
connection_idMethod · 0.45

Tested by

no test coverage detected