Highly-opinionated (ex-bullshit-free) MTPROTO proxy for Telegram. If you use v1.0 or upgrade broke you proxy, please read the chapter Version 2
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

rpc_handshake_request.go 372B

123456789101112131415161718192021
  1. package rpc
  2. import "bytes"
  3. type RPCHandshakeRequest struct {
  4. }
  5. func (r *RPCHandshakeRequest) Bytes() []byte {
  6. buf := &bytes.Buffer{}
  7. buf.Write(RPCTagHandshake)
  8. buf.Write(RPCHandshakeFlags)
  9. buf.Write(RPCHandshakeSenderPID)
  10. buf.Write(RPCHandshakePeerPID)
  11. return buf.Bytes()
  12. }
  13. func NewRPCHandshakeRequest() *RPCHandshakeRequest {
  14. return &RPCHandshakeRequest{}
  15. }