mirror of
https://github.com/ScuroNeko/mtg.git
synced 2026-09-01 01:34:02 +03:00
FILE / ScuroNeko/mtg
mtproto/rpc/rpc_handshake_request.go
Исходный файл и его история в репозитории.
22 lines
372 B
Go
22 lines
372 B
Go
package rpc
|
|
|
|
import "bytes"
|
|
|
|
type RPCHandshakeRequest struct {
|
|
}
|
|
|
|
func (r *RPCHandshakeRequest) Bytes() []byte {
|
|
buf := &bytes.Buffer{}
|
|
|
|
buf.Write(RPCTagHandshake)
|
|
buf.Write(RPCHandshakeFlags)
|
|
buf.Write(RPCHandshakeSenderPID)
|
|
buf.Write(RPCHandshakePeerPID)
|
|
|
|
return buf.Bytes()
|
|
}
|
|
|
|
func NewRPCHandshakeRequest() *RPCHandshakeRequest {
|
|
return &RPCHandshakeRequest{}
|
|
}
|