Expand description
HoprSession object providing the session functionality over the HOPR transport
The session proxies the user interactions with the transport to hide the advanced interactions and functionality.
The SessionManager allows for automatic management of sessions via the Start protocol.
This crate implements RFC-0007.
Modules§
- balancer 🔒
- counters
- Process-global packet-flow diagnostic counters for the throughput stress harness.
- errors
- flow_
control - HOPR-transport wiring for the Session send-window flow control.
- manager 🔒
- types 🔒
- utils 🔒
Structs§
- Agreed
SsaQuota - Representation of a data quota per SSA agreed upon during the Session establishment.
- Application
Data In - Wrapper for incoming [
ApplicationData] with optional [IncomingPacketInfo]. - Application
Data Out - Wrapper for outgoing [
ApplicationData] with optional [IncomingPacketInfo]. - Atomic
Surb Flow Estimator - An implementation of
SurbFlowEstimatorthat tracks the number of produced and consumed SURBs via twoAtomicU64s. - Balancer
State Values - Runtime state of the
SurbBalancer. - Flow
Control Config - Client-tunable flow-control parameters. Defaults are deliberately conservative (anti-grief-preserving): the window starts at the floor and only grows on proven delivery, and the opt-in robustness knobs are off. This is the clean profile.
- Hopr
Session - Represents the Session protocol socket over HOPR.
- Hopr
Session Capabilities - Wrapper for
Capabilitiesthat makes conversion to/fromu8possible. - Hopr
Session Config - Configures the Session protocol socket over HOPR.
- Incoming
Session PixConfig - Configuration of the PIX protocol for incoming Sessions on Exit nodes.
- PixParams
- Everything about PIX two nodes must agree on for a Session, and the only encoding of it: three dimensions and the curve suite they are dimensions of.
- PixToolbox
- PIX protocol toolbox to enable
SessionManagerto use PIX protocol. - Session
Client Config - Configuration for the session.
- Session
Manager - Manages lifecycles of Sessions.
- Session
Manager Config - Configuration for the
SessionManager. - Surb
Balancer Config - Configuration for the
SurbBalancer.
Enums§
- Acknowledgement
Mode - Indicates the acknowledgement mode of a stateful Session socket.
- Capability
- Individual capabilities of a Session.
- Destination
Routing - Routing information containing forward or return routing options.
- Dispatch
Result - Indicates the result of processing a message.
- Hopr
Session InPix Event - Events received by the
crate::manager::SessionManagerin reaction to received shares from the packet pipeline. - Hopr
Session OutPix Event - Events raised by the
crate::manager::SessionManagerin response to received PIX messages. - Invalid
PixParams - Why a
PixParamsquadruple was rejected. - IpOr
Host - Implements a host name with port.
This could be either a DNS name with port
or an IP address with port represented by
std::net::SocketAddr. - IpProtocol
- Lists some of the IP protocols.
- Sealed
Host - Contains optionally encrypted
IpOrHost. - Session
Target SessionId,ServiceId, andSessionTargetare provided byhopr-typesand re-exported here viahopr-utils, so they match the publishedhopr-apisession types.
Constants§
- DEFAULT_
MAX_ SSAS_ PER_ SSA_ REQUEST - Default for
SessionManagerConfig::max_ssas_per_ssa_request— how many SSA commitments an Entry accepts in a single [SsaServerCommitmentMessage]. - DEFAULT_
PIX_ POLYS_ PER_ SSA - Default number of polynomials (“SSA parts”) a single SSA is split into.
- DEFAULT_
PIX_ SHARES_ PER_ POLY - Default number of shares required to reconstruct a single SSA part.
- DEFAULT_
PIX_ SSA_ QUOTA - Nominal per-SSA data quota implied by the default PIX dimensions.
- DEFAULT_
PIX_ SURPLUS_ SHARES - Default number of shares emitted per SSA part beyond
DEFAULT_PIX_SHARES_PER_POLY. - DEFAULT_
SSAS_ PER_ SSA_ REQUEST - Default for
IncomingSessionPixConfig::ssas_per_request— how many SSAs an Exit asks for in a single [SsaServerCommitmentMessage]. - LOCAL_
PIX_ SUITE - The elliptic curve suite this build instantiates PIX over, as announced to peers.
- MAX_
SSA_ BATCH_ SIZE - Hard ceiling on both SSA batch-size knobs, whatever the configuration says.
- MIN_
BALANCER_ SAMPLING_ INTERVAL - Smallest possible interval for balancer sampling.
- MIN_
SURB_ BUFFER_ DURATION - Minimum time the SURB buffer must endure if no SURBs are being produced.
- SESSION_
MTU - Number of bytes that can be sent in a single Session protocol payload.
- SURB_
SIZE - Size of the HOPR SURB in bytes.
Traits§
- IpOr
Host Ext - Runtime-specific extensions for
IpOrHost.
Functions§
- transfer_
session - Bidirectionally copies data between a
HoprSessionand an arbitrary async IO stream.
Type Aliases§
- Capabilities
- Set of Session capabilities.
- Hopr
Start Protocol - Start protocol instantiation for HOPR.
- Incoming
Session - Wrapper for an incoming
HoprSessioncarrying theSessionIdandSessionTargetextracted from the Start protocol during session establishment. - Service
Id SessionId,ServiceId, andSessionTargetare provided byhopr-typesand re-exported here viahopr-utils, so they match the publishedhopr-apisession types.- Session
Id SessionId,ServiceId, andSessionTargetare provided byhopr-typesand re-exported here viahopr-utils, so they match the publishedhopr-apisession types.