Documentation ¶
Overview ¶
Package reverse provides a message type for the forwarding directions in a 3 layer routing header.
Index ¶
- Constants
- func Gen() codec.Codec
- func New(ip *netip.AddrPort) ont.Onion
- type Reverse
- func (x *Reverse) Account(res *sess.Data, sm *sess.Manager, s *sessions.Data, last bool) (skip bool, sd *sessions.Data)
- func (x *Reverse) Decode(s *splice.Splice) (e error)
- func (x *Reverse) Encode(s *splice.Splice) (e error)
- func (x *Reverse) Handle(s *splice.Splice, p ont.Onion, ng ont.Ngin) (e error)
- func (x *Reverse) Len() int
- func (x *Reverse) Magic() string
- func (x *Reverse) Unwrap() interface{}
- func (x *Reverse) Wrap(inner ont.Onion)
Constants ¶
View Source
const (
Magic = "rvrs"
)
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Reverse ¶
type Reverse struct { // AddrPort of the relay to forward this message. AddrPort *netip.AddrPort // Onion contained inside this message. ont.Onion }
Reverse is a part of the 3 layer relay RoutingHeader which provides the next address to forward to.
func (*Reverse) Account ¶
func (x *Reverse) Account(res *sess.Data, sm *sess.Manager, s *sessions.Data, last bool) (skip bool, sd *sessions.Data)
Account for the reverse message - note that the actual size being carried is computed at the end of the circuit with the returned Response/Confirmation/Message.
func (*Reverse) Handle ¶
Handle is the relay logic for an engine handling a Reverse message.
This is where the 3 layer RoutingHeader is processed.
func (*Reverse) Magic ¶
Magic is the identifying 4 byte string indicating a Reverse message follows.
Click to show internal directories.
Click to hide internal directories.