| 319 | } |
| 320 | } |
| 321 | void process_query(ConnectionId connection_id, QueryId id, td::BufferSlice data) { |
| 322 | LOG(DEBUG) << "tcp: processing query from " << connection_id; |
| 323 | auto it = active_connections_.find(connection_id); |
| 324 | if (it == active_connections_.end()) { |
| 325 | return; |
| 326 | } |
| 327 | auto P = td::PromiseCreator::lambda([self_id = actor_id(this), id, connection_id](td::Result<td::BufferSlice> R) { |
| 328 | if (R.is_ok()) { |
| 329 | td::actor::send_closure(self_id, &TcpClientImpl::send_query_answer, connection_id, id, R.move_as_ok()); |
| 330 | } else { |
| 331 | td::actor::send_closure(self_id, &TcpClientImpl::send_query_answer_error, connection_id, id, R.move_as_error()); |
| 332 | } |
| 333 | }); |
| 334 | callback_->receive_query(connection_id, std::move(data), std::move(P)); |
| 335 | } |
| 336 | void unregister_query(QueryId query_id) { |
| 337 | out_queries_.erase(query_id); |
| 338 | } |
nothing calls this directly
no test coverage detected