utils

package
v0.22.12 Latest Latest
Warning

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

Go to latest
Published: Jul 7, 2021 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	S2CPacketSize = 1052
	C2SPacketSize = 40
)

Variables

This section is empty.

Functions

func C2SMarshal added in v0.22.0

func C2SMarshal(fid string, FileIdx int16, PktIdx []int16) []byte

func S2CMarshal added in v0.22.0

func S2CMarshal(fid string, FileIdx int16, PktIdx int16, payloadSize int16, payload []byte) []byte

Types

type C2SProtocol added in v0.22.0

type C2SProtocol struct {
	FID     [20]byte
	FileIdx int16

	PktIdx [8]int16
	// contains filtered or unexported fields
}

func C2SUnmarshal added in v0.22.0

func C2SUnmarshal(C2SPkt []byte) (content C2SProtocol)

type S2CProtocol added in v0.22.0

type S2CProtocol struct {
	FID     [20]byte
	FileIdx int16

	PktIdx      int16
	PayloadSize int16
	Payload     [1024]byte
	// contains filtered or unexported fields
}

func S2CUnmarshal added in v0.22.0

func S2CUnmarshal(S2CPkt []byte) (content S2CProtocol)

Jump to

Keyboard shortcuts

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