Class: MTProto::Type::ClientDHInnerData
- Inherits:
-
Object
- Object
- MTProto::Type::ClientDHInnerData
- Defined in:
- lib/mtproto/type/client_dh_inner_data.rb
Constant Summary collapse
- CONSTRUCTOR =
0x6643b654
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
Constructor Details
#initialize(nonce:, server_nonce:, retry_id:, g_b:) ⇒ ClientDHInnerData
Returns a new instance of ClientDHInnerData.
12 13 14 15 16 17 |
# File 'lib/mtproto/type/client_dh_inner_data.rb', line 12 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.
10 11 12 |
# File 'lib/mtproto/type/client_dh_inner_data.rb', line 10 def g_b @g_b end |
#nonce ⇒ Object (readonly)
Returns the value of attribute nonce.
10 11 12 |
# File 'lib/mtproto/type/client_dh_inner_data.rb', line 10 def nonce @nonce end |
#retry_id ⇒ Object (readonly)
Returns the value of attribute retry_id.
10 11 12 |
# File 'lib/mtproto/type/client_dh_inner_data.rb', line 10 def retry_id @retry_id end |
#server_nonce ⇒ Object (readonly)
Returns the value of attribute server_nonce.
10 11 12 |
# File 'lib/mtproto/type/client_dh_inner_data.rb', line 10 def server_nonce @server_nonce end |
Instance Method Details
#serialize ⇒ Object
19 20 21 22 23 24 25 26 |
# File 'lib/mtproto/type/client_dh_inner_data.rb', line 19 def serialize data = Serializer.serialize_int(CONSTRUCTOR) data += @nonce data += @server_nonce data += Serializer.serialize_long(@retry_id) data += Serializer.serialize_bytes(@g_b) data end |