Documentation ¶
Overview ¶
Package whisper provides a message type for sending a message to a hidden service, or back to a hidden service client.
These messages are the same for both sides after a route message forwards via the intro routing header an introducer receives for a hidden service, as there is no intermediary bridge like in rendezvous routing.
Index ¶
- Constants
- func Gen() codec.Codec
- type Message
- func (x *Message) Account(res *sess.Data, sm *sess.Manager, s *sessions.Data, last bool) (skip bool, sd *sessions.Data)
- func (x *Message) Decode(s *splice.Splice) (e error)
- func (x *Message) Encode(s *splice.Splice) (e error)
- func (x *Message) Handle(s *splice.Splice, p ont.Onion, ng ont.Ngin) (e error)
- func (x *Message) Len() int
- func (x *Message) Magic() string
- func (x *Message) Unwrap() interface{}
- func (x *Message) Wrap(inner ont.Onion)
Constants ¶
const ( MessageMagic = "whis" 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 ¶
Types ¶
type Message ¶
type Message struct { Forwards [2]*sessions.Data Address *crypto.Pub ID, Re nonce.ID Forward, Return *hidden.ReplyHeader Payload slice.Bytes }
Message is the generic, peer to peer, bidirectional messade type for between a client and a hidden service.
The message format is the same for both sides, as the connection is maintained by each side forwarding a new return path each message they send.
func (*Message) Account ¶
func (x *Message) Account(res *sess.Data, sm *sess.Manager, s *sessions.Data, last bool) (skip bool, sd *sessions.Data)
Account for the Message. The client obviously doesn't do anything with this.
todo: how does hidden service bill? We need to establish hidden service session type.