codec

package
v0.1.20 Latest Latest
Warning

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

Go to latest
Published: Jul 19, 2023 License: Unlicense Imports: 1 Imported by: 0

Documentation

Overview

Package codec defines an interface for encoding and decoding message packets in the Indra network.

These are implemented for onion messages, advertisements and other peer messages that are not for relaying.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Codec

type Codec interface {
	Magic() string
	Encode(s *splice.Splice) (e error)
	Decode(s *splice.Splice) (e error)
	Len() int
	Unwrap() interface{}
}

Codec is a unit of data that can be read and written from a binary form. All Onion are Codec but not all Codec are Onion. Codec is also used for the Dispatcher's message headers.

Directories

Path Synopsis
ad
Package ad is an abstract message type that composes the common elements of all ads - nonce ID, public key (identity), expiry and signature.
Package ad is an abstract message type that composes the common elements of all ads - nonce ID, public key (identity), expiry and signature.
addresses
Package addresses defines the message format that provides the network multi-address of a peer with a given public identity key.
Package addresses defines the message format that provides the network multi-address of a peer with a given public identity key.
intro
Package intro defines a message type that provides information about an introduction point for a hidden service.
Package intro defines a message type that provides information about an introduction point for a hidden service.
load
Package load provides a message type that provides information about the current load level of a node identified by its public key.
Package load provides a message type that provides information about the current load level of a node identified by its public key.
peer
Package peer provides a message type that provides the base information, identity key and relay rate for an Indra relay.
Package peer provides a message type that provides the base information, identity key and relay rate for an Indra relay.
services
Package services provides a message type for advertising what kinds of exit services a peer provides to clients, including the port number and the cost per megabyte of data.
Package services provides a message type for advertising what kinds of exit services a peer provides to clients, including the port number and the cost per megabyte of data.
onion
cores/balance
Package balance provides an onion layer message that comes in response to a getbalance query, informing the client of the balance of a session, identified by the getbalance nonce.ID.
Package balance provides an onion layer message that comes in response to a getbalance query, informing the client of the balance of a session, identified by the getbalance nonce.ID.
cores/confirmation
Package confirmation provides an onion message type that simply returns a confirmation for an associated nonce.ID of a previous message that we want to confirm was received.
Package confirmation provides an onion message type that simply returns a confirmation for an associated nonce.ID of a previous message that we want to confirm was received.
cores/end
Package end is a null tombstone type onion message that indicates there is no more data in the onion (used with encoding only).
Package end is a null tombstone type onion message that indicates there is no more data in the onion (used with encoding only).
cores/response
Package response provides a message type in response to an Exit message.
Package response provides a message type in response to an Exit message.
crypt
Package crypt is an onion message layer which specifies that subsequent content will be encrypted.
Package crypt is an onion message layer which specifies that subsequent content will be encrypted.
delay
Package delay provides an onion message type that allows a client to specify an arbitrary delay time before processing the rest of an onion message.
Package delay provides an onion message type that allows a client to specify an arbitrary delay time before processing the rest of an onion message.
exit
Package exit is an onion message type that contains a payload intended to be forwarded to the exit service of a relay.
Package exit is an onion message type that contains a payload intended to be forwarded to the exit service of a relay.
forward
Package forward is an onion message layer that specifies a single redirection for the remainder of the onion.
Package forward is an onion message layer that specifies a single redirection for the remainder of the onion.
getbalance
Package getbalance provides an onion message layer type that makes a request for the current balance of a session.
Package getbalance provides an onion message layer type that makes a request for the current balance of a session.
hidden/introquery
Package introquery is an onion message that verifies a relay is an introducer for a given hidden service, returning its intro.Ad.
Package introquery is an onion message that verifies a relay is an introducer for a given hidden service, returning its intro.Ad.
hidden/ready
Package ready provides an onion message type that is sent via client provided routing header back to the client after an introducer forwards a route message to initiate a hidden service connection.
Package ready provides an onion message type that is sent via client provided routing header back to the client after an introducer forwards a route message to initiate a hidden service connection.
hidden/route
Package route provides an onion mesage type that initiates a hidden service connection with a designated introducer who holds the forwarding routing header to send the route message to a hidden service, who replies to the client using their reply routing header with a ready message.
Package route provides an onion mesage type that initiates a hidden service connection with a designated introducer who holds the forwarding routing header to send the route message to a hidden service, who replies to the client using their reply routing header with a ready message.
hidden/services
Package services provides a message type for hidden services to send to designated introducer relays.
Package services provides a message type for hidden services to send to designated introducer relays.
hidden/whisper
Package whisper provides a message type for sending a message to a hidden service, or back to a hidden service client.
Package whisper provides a message type for sending a message to a hidden service, or back to a hidden service client.
reverse
Package reverse provides a message type for the forwarding directions in a 3 layer routing header.
Package reverse provides a message type for the forwarding directions in a 3 layer routing header.
session
Package session provides an onion message type that delivers the two session private keys to be associated with a session, for which the hash of the secrets was used as the payment preimage for starting a session.
Package session provides an onion message type that delivers the two session private keys to be associated with a session, for which the hash of the secrets was used as the payment preimage for starting a session.
Package ont defines interfaces for the engine: Ngin and Onion coding.Codec subtypes, and some helpers that use the abstraction.
Package ont defines interfaces for the engine: Ngin and Onion coding.Codec subtypes, and some helpers that use the abstraction.
Package reg is a registry for message types that implement the coding.Codec interface.
Package reg is a registry for message types that implement the coding.Codec interface.

Jump to

Keyboard shortcuts

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