client

package
v0.1.6 Latest Latest
Warning

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

Go to latest
Published: Jan 9, 2023 License: Unlicense Imports: 33 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultDeadline  = 10 * time.Minute
	ReverseLayerLen  = reverse.Len + layer.Len
	ReverseHeaderLen = 3 * ReverseLayerLen
)

Variables

This section is empty.

Functions

func SimpleSelector

func SimpleSelector(n node.Nodes, exit *node.Node,
	count int) (selected node.Nodes)

SimpleSelector is a pure random shuffle selection algorithm for producing a list of nodes for an onion.

This function will return nil if there isn't enough

Types

type Client

type Client struct {
	*node.Node
	node.Nodes
	// *address.SendCache
	// *address.ReceiveCache
	session.Sessions
	PendingSessions []nonce.ID
	*confirm.Confirms
	ExitHooks response.Hooks
	sync.Mutex
	*signer.KeySet
	atomic.Bool
	qu.C
}

func New

func New(tpt ifc.Transport, hdrPrv *prv.Key, no *node.Node,
	nodes node.Nodes) (c *Client, e error)

func (*Client) Cleanup

func (cl *Client) Cleanup()

func (*Client) FindCloaked

func (cl *Client) FindCloaked(clk cloak.PubKey) (hdr *prv.Key, pld *prv.Key)

FindCloaked searches the client identity key and the Sessions for a match.

func (*Client) RegisterConfirmation

func (cl *Client) RegisterConfirmation(hook confirm.Hook,
	cnf nonce.ID)

func (*Client) Send

func (cl *Client) Send(addr *netip.AddrPort, b slice.Bytes)

func (*Client) SendKeys

func (cl *Client) SendKeys(nodeID nonce.ID,
	hook func(cf nonce.ID)) (confirmation nonce.ID, hdr, pld *prv.Key,
	e error)

func (*Client) Shutdown

func (cl *Client) Shutdown()

func (*Client) Start

func (cl *Client) Start()

Start a single thread of the Client.

Jump to

Keyboard shortcuts

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