message

package
v0.1.13 Latest Latest
Warning

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

Go to latest
Published: Jun 7, 2023 License: Unlicense Imports: 17 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MessageMagic    = "mess"
	ReplyCiphersLen = 2*consts.RoutingHeaderLen +
		6*sha256.Len +
		6*nonce.IVLen
	MessageLen = magic.Len +
		2*nonce.IDLen +
		2*consts.RoutingHeaderLen +
		ReplyCiphersLen
)

Variables

This section is empty.

Functions

func MessageGen

func MessageGen() coding.Codec

Types

type Message

type Message struct {
	Forwards        [2]*sessions.Data
	Address         *crypto.Pub
	ID, Re          nonce.ID
	Forward, Return *hidden.ReplyHeader
	Payload         slice.Bytes
}

func NewMessage

func NewMessage() (msg *Message)

func (*Message) Account

func (x *Message) Account(res *sess.Data, sm *sess.Manager, s *sessions.Data, last bool) (skip bool, sd *sessions.Data)

func (*Message) Decode

func (x *Message) Decode(s *splice.Splice) (e error)

func (*Message) Encode

func (x *Message) Encode(s *splice.Splice) (e error)

func (*Message) GetOnion

func (x *Message) GetOnion() interface{}

func (*Message) Handle

func (x *Message) Handle(s *splice.Splice, p ont.Onion, ng ont.Ngin) (e error)

func (*Message) Len

func (x *Message) Len() int

func (*Message) Magic

func (x *Message) Magic() string

func (*Message) Wrap

func (x *Message) Wrap(inner ont.Onion)

Jump to

Keyboard shortcuts

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