protocol

package
v0.0.0-...-5dba8c9 Latest Latest
Warning

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

Go to latest
Published: Sep 7, 2015 License: Apache-2.0 Imports: 6 Imported by: 4

Documentation

Overview

通信协议模块

Index

Constants

View Source
const (
	MAX_PACKET_LENGTH uint32 = 1 << 20 // 1M
)

Packet最大包长度定义

Variables

This section is empty.

Functions

func UInt32ToBytes

func UInt32ToBytes(i uint32) []byte

UInt32到Bytes大端序转换

Types

type Packet

type Packet struct {
	Msg *message.Container
	// contains filtered or unexported fields
}

Packet结构

func (*Packet) Pack

func (pkt *Packet) Pack() []byte

Packet打包方法

func (*Packet) UnPack

func (pkt *Packet) UnPack(b *[]byte) (bool, error)

Packet解包方法

Jump to

Keyboard shortcuts

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