FILE / ScuroNeko/mtg

mtproto/rpc/handshake_request.go

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