tcp_pack

package
v0.0.0-...-4d122b3 Latest Latest
Warning

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

Go to latest
Published: Jan 12, 2016 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetPackId

func GetPackId(data []byte) string

func Pack

func Pack(data []byte) []byte

将字节数组加上4字节的长度头

func Packing

func Packing(data []byte, info map[string]string, hasHeader bool) []byte

func ParseHeader

func ParseHeader(vbytes []byte) map[string]string

func UnPack

func UnPack(conn net.Conn) (int, []byte)

解包字节数组,返回内容和长度

Types

type PackHeader

type PackHeader struct {
	Route   []map[string]string
	PackLen int
}

func ExtractHeader

func ExtractHeader(data []byte) (PackHeader, int, error)

Jump to

Keyboard shortcuts

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