translayer

package
v0.0.0-...-56464ea Latest Latest
Warning

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

Go to latest
Published: Aug 8, 2020 License: GPL-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	BMAILVER1 uint16 = 1
	BMAILVER2 uint16 = 2
)
View Source
const (
	MIN_TYP uint16 = iota
	//bhello
	HELLO
	HELLO_ACK

	//bmtp
	SEND_ENVELOPE
	RESP_ENVELOPE

	SEND_CRYPT_ENVELOPE
	RESP_CRYPT_ENVELOPE

	SEND_ATTACHMNENT
	RESP_ATTACHMENT

	//bpop
	STAT
	STAT_RESP
	LIST
	LIST_RESP
	RETR
	RETR_RESP
	DELETE
	DELETE_RESP

	CONTACT_HELLO
	CONTACT_HELLO_RESP
	CONTACT_ADD
	CONTACT_DEL
	CONTACT_PULL

	MAX_TYP
)
View Source
const (
	Uin8Size   int = 1
	Uint16Size int = 2
	Uint32Size int = 4
	Uint64Size int = 8
)
View Source
const BMTP_PORT = 1025
View Source
const BPOP3 = 1110

Variables

This section is empty.

Functions

func BMHeadSize

func BMHeadSize() int

func UInt16ToBuf

func UInt16ToBuf(ui16 uint16) []byte

func UInt32ToBuf

func UInt32ToBuf(ui32 uint32) []byte

func UInt64ToBuf

func UInt64ToBuf(ui64 uint64) []byte

Types

type BMTransLayer

type BMTransLayer struct {
	// contains filtered or unexported fields
}

func NewBMTL

func NewBMTL(typ uint16) *BMTransLayer

func (*BMTransLayer) GetDataLen

func (bmtl *BMTransLayer) GetDataLen() uint32

func (*BMTransLayer) GetMsgType

func (bmtl *BMTransLayer) GetMsgType() uint16

func (*BMTransLayer) GetVersion

func (bmtl *BMTransLayer) GetVersion() uint16

func (*BMTransLayer) Pack

func (bmtl *BMTransLayer) Pack() ([]byte, error)

func (*BMTransLayer) SetDataLen

func (bmtl *BMTransLayer) SetDataLen(l uint32)

func (*BMTransLayer) String

func (bmtl *BMTransLayer) String() string

func (*BMTransLayer) UnPack

func (bmtl *BMTransLayer) UnPack(data []byte) (int, error)

type EnveUniqID

type EnveUniqID [16]byte

Jump to

Keyboard shortcuts

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