diff --git a/td/mtproto/SessionConnection.cpp b/td/mtproto/SessionConnection.cpp index 2a53880dd..37d0a75b8 100644 --- a/td/mtproto/SessionConnection.cpp +++ b/td/mtproto/SessionConnection.cpp @@ -171,6 +171,10 @@ namespace mtproto { * */ +inline StringBuilder &operator<<(StringBuilder &string_builder, const SessionConnection::MsgInfo &info) { + return string_builder << "[msg_id:" << format::as_hex(info.message_id) << "][seq_no:" << info.seq_no << ']'; +} + unique_ptr SessionConnection::move_as_raw_connection() { was_moved_ = true; return std::move(raw_connection_); diff --git a/td/mtproto/SessionConnection.h b/td/mtproto/SessionConnection.h index b7881b574..1cea16d33 100644 --- a/td/mtproto/SessionConnection.h +++ b/td/mtproto/SessionConnection.h @@ -53,16 +53,6 @@ namespace mtproto { class AuthData; -struct MsgInfo { - uint64 message_id; - int32 seq_no; - size_t size; -}; - -inline StringBuilder &operator<<(StringBuilder &string_builder, const MsgInfo &info) { - return string_builder << "[msg_id:" << format::as_hex(info.message_id) << "][seq_no:" << info.seq_no << ']'; -} - class SessionConnection final : public Named , private RawConnection::Callback { @@ -133,6 +123,14 @@ class SessionConnection final static constexpr double QUERY_DELAY = 0.001; // 0.001s static constexpr double RESEND_ANSWER_DELAY = 0.001; // 0.001s + struct MsgInfo { + uint64 message_id; + int32 seq_no; + size_t size; + }; + + friend StringBuilder &operator<<(StringBuilder &string_builder, const MsgInfo &info); + bool online_flag_ = false; bool is_main_ = false; bool was_moved_ = false;