highway

package
v0.0.0-...-96e707a Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 11, 2025 License: AGPL-3.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

View Source
const BlockSize = 1024 * 1024

Variables

This section is empty.

Functions

This section is empty.

Types

type Addr

type Addr struct {
	IP   uint32
	Port int
	Time int64
}

func (Addr) AsNetIP

func (a Addr) AsNetIP() net.IP

func (Addr) String

func (a Addr) String() string

type Session

type Session struct {
	Uin        string
	AppID      uint32
	SigSession []byte
	SessionKey []byte

	SsoAddr []Addr
	// contains filtered or unexported fields
}

func (*Session) AddrLength

func (s *Session) AddrLength() int

func (*Session) AppendAddr

func (s *Session) AppendAddr(ip, port uint32)

func (*Session) Upload

func (s *Session) Upload(trans Transaction) ([]byte, error)

type Transaction

type Transaction struct {
	CommandID int32
	Body      io.Reader
	Sum       []byte // md5 sum of body
	Size      int64  // body size
	Ticket    []byte
	LoginSig  []byte
	Ext       []byte
	Encrypt   bool
}

func (*Transaction) Build

func (trans *Transaction) Build(s *Session, offset uint64, length uint32, md5hash []byte) *highway.ReqDataHighwayHead

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL