FILE / ScuroNeko/mtg

mtproto/rpc/handshake_request.go

Исходный файл и его история в репозитории.
FILE 154ff70bf72e541b771c0ccedf9a2b63c049662a
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{}
}