Class: MTProto::TL::ClientDHInnerData
- Inherits:
-
Object
- Object
- MTProto::TL::ClientDHInnerData
- Includes:
- Binary
- Defined in:
- lib/mtproto/tl/objects/client_dh_inner_data.rb
Instance Attribute Summary collapse
-
#g_b ⇒ Object
readonly
Returns the value of attribute g_b.
-
#nonce ⇒ Object
readonly
Returns the value of attribute nonce.
-
#retry_id ⇒ Object
readonly
Returns the value of attribute retry_id.
-
#server_nonce ⇒ Object
readonly
Returns the value of attribute server_nonce.
Instance Method Summary collapse
-
#initialize(nonce:, server_nonce:, retry_id:, g_b:) ⇒ ClientDHInnerData
constructor
A new instance of ClientDHInnerData.
- #serialize ⇒ Object
Methods included from Binary
#b_u32, #b_u64, #u32_b, #u64_b
Constructor Details
#initialize(nonce:, server_nonce:, retry_id:, g_b:) ⇒ ClientDHInnerData
Returns a new instance of ClientDHInnerData.
10 11 12 13 14 15 |
# File 'lib/mtproto/tl/objects/client_dh_inner_data.rb', line 10 def initialize(nonce:, server_nonce:, retry_id:, g_b:) @nonce = nonce @server_nonce = server_nonce @retry_id = retry_id @g_b = g_b end |
Instance Attribute Details
#g_b ⇒ Object (readonly)
Returns the value of attribute g_b.
8 9 10 |
# File 'lib/mtproto/tl/objects/client_dh_inner_data.rb', line 8 def g_b @g_b end |
#nonce ⇒ Object (readonly)
Returns the value of attribute nonce.
8 9 10 |
# File 'lib/mtproto/tl/objects/client_dh_inner_data.rb', line 8 def nonce @nonce end |
#retry_id ⇒ Object (readonly)
Returns the value of attribute retry_id.
8 9 10 |
# File 'lib/mtproto/tl/objects/client_dh_inner_data.rb', line 8 def retry_id @retry_id end |
#server_nonce ⇒ Object (readonly)
Returns the value of attribute server_nonce.
8 9 10 |
# File 'lib/mtproto/tl/objects/client_dh_inner_data.rb', line 8 def server_nonce @server_nonce end |
Instance Method Details
#serialize ⇒ Object
17 18 19 20 21 22 23 24 25 |
# File 'lib/mtproto/tl/objects/client_dh_inner_data.rb', line 17 def serialize result = u32_b(Constructors::CLIENT_DH_INNER_DATA) result += @nonce.bytes result += @server_nonce.bytes result += u64_b(@retry_id) result += serialize_tl_bytes(@g_b.bytes) result end |