FILE / ScuroNeko/mtg

mtproto/rpc/handshake_request.go

Исходный файл и его история в репозитории.
FILE a3933e6ede78eb40ea347b699b7a7637d7bca18d
Files
mtg/mtproto/rpc/handshake_request.go
T

22 lines
345 B
Go

package rpc
import "bytes"
type HandshakeRequest struct {
}
func (r *HandshakeRequest) Bytes() []byte {
buf := &bytes.Buffer{}
buf.Write(TagHandshake)
buf.Write(HandshakeFlags)
buf.Write(HandshakeSenderPID)
buf.Write(HandshakePeerPID)
return buf.Bytes()
}
func NewHandshakeRequest() *HandshakeRequest {
return &HandshakeRequest{}
}