mpprotocol

package
v0.0.0-...-3faa710 Latest Latest
Warning

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

Go to latest
Published: Jul 12, 2020 License: BSD-3-Clause Imports: 7 Imported by: 0

Documentation

Overview

Package mpprotocol protocol_basic User: 姜伟 Time: 2020-02-19 04:56:11

Index

Constants

View Source
const (
	// HeaderLength 请求头长度
	HeaderLength uint32 = 4
)

Variables

This section is empty.

Functions

func Pack

func Pack(pd *ProtocolData) []byte

Pack 数据打包

Types

type ProtocolData

type ProtocolData struct {
	Command string                 // 命令
	Extend  string                 // 扩展字段
	URI     string                 // URI
	Data    map[string]interface{} // 数据
}

ProtocolData 协议数据类型

func NewProtocolData

func NewProtocolData() *ProtocolData

NewProtocolData 实例化协议数据类型

func Unpack

func Unpack(r io.Reader) *ProtocolData

Unpack 数据解包

Jump to

Keyboard shortcuts

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