protocol

package module
v0.0.0-...-004a281 Latest Latest
Warning

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

Go to latest
Published: Jan 25, 2022 License: Apache-2.0 Imports: 2 Imported by: 0

README

protocol

A simple protocol package for network communication using json.

Documentation

Overview

通讯协议处理

Index

Constants

View Source
const (
	ConstHeader       = "Headers"
	ConstHeaderLength = 7
	ConstMLength      = 4
)

Variables

This section is empty.

Functions

func BytesToInt

func BytesToInt(b []byte) int

字节转换成整形

func Depack

func Depack(buffer []byte, readerChannel chan []byte) []byte

解包

func Enpack

func Enpack(message []byte) []byte

封包

func IntToBytes

func IntToBytes(n int) []byte

整形转换成字节

Types

This section is empty.

Jump to

Keyboard shortcuts

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