Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Common ¶
Common is a message (either encrypted or unencrypted) used for communication between the client and server.
type Encrypted ¶
type Encrypted struct {
Msg []byte
MsgID int64
AuthKeyHash []byte
Salt int64
SessionID int64
SeqNo int32
MsgKey []byte
}
func DeserializeEncrypted ¶
type MessageInformator ¶
type MessageInformator interface {
GetSessionID() int64
GetSeqNo() int32
GetServerSalt() int64
GetAuthKey() []byte
}
------------------------------------------------------------------------------------------
MessageInformator is used to provide information about the current session for message serialization. It is essentially an MTProto data structure.
type Unencrypted ¶
func DeserializeUnencrypted ¶
func DeserializeUnencrypted(data []byte) (*Unencrypted, error)
func (*Unencrypted) GetMsg ¶
func (msg *Unencrypted) GetMsg() []byte
func (*Unencrypted) GetMsgID ¶
func (msg *Unencrypted) GetMsgID() int
func (*Unencrypted) GetSeqNo ¶
func (msg *Unencrypted) GetSeqNo() int
func (*Unencrypted) Serialize ¶
func (msg *Unencrypted) Serialize(_ MessageInformator) ([]byte, error)
Click to show internal directories.
Click to hide internal directories.