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

Method process_init_packet

net/TcpConnection.cpp:286–302  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

284}
285
286td::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
304td::Status TcpConnection::process_packet(td::BufferSlice data) {
305 TRY_RESULT(r, fetch_tl_object<cocoon_api::tcp_Packet>(data, true));

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected