| 284 | } |
| 285 | |
| 286 | td::Status TcpConnection::process_init_packet(td::BufferSlice data) { |
| 287 | if (is_client_) { |
| 288 | TRY_RESULT(r, fetch_tl_object<cocoon_api::tcp_connected>(data, true)); |
| 289 | inited_ = true; |
| 290 | send_ready(); |
| 291 | return td::Status::OK(); |
| 292 | } else { |
| 293 | TRY_RESULT(r, fetch_tl_object<cocoon_api::tcp_connect>(data, true)); |
| 294 | |
| 295 | auto new_data = create_serialize_tl_object<cocoon_api::tcp_connected>(r->id_); |
| 296 | send_uninit(std::move(new_data)); |
| 297 | |
| 298 | inited_ = true; |
| 299 | send_ready(); |
| 300 | return td::Status::OK(); |
| 301 | } |
| 302 | } |
| 303 | |
| 304 | td::Status TcpConnection::process_packet(td::BufferSlice data) { |
| 305 | TRY_RESULT(r, fetch_tl_object<cocoon_api::tcp_Packet>(data, true)); |
nothing calls this directly
no outgoing calls
no test coverage detected