packet

package
v0.5.6-beta1 Latest Latest
Warning

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

Go to latest
Published: Nov 2, 2021 License: GPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Version string = "2.0.0 dev"
)

Variables

This section is empty.

Functions

func AesSecretExchange

func AesSecretExchange(conn net.Conn) ([]byte, error)

func EnPacket

func EnPacket(pack Packet, key []byte) ([]byte, error)

func MarshalHeader

func MarshalHeader(v map[string][]byte) []byte

func UnmarshalHeader

func UnmarshalHeader(v []byte) map[string][]byte

Types

type Packet

type Packet struct {
	Header  []byte
	Message []byte
}

func DePacket

func DePacket(pack, key []byte) (Packet, error)

Jump to

Keyboard shortcuts

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