Skip to main content

Crate hopr_transport_session

Crate hopr_transport_session 

Source
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§

AgreedSsaQuota
Representation of a data quota per SSA agreed upon during the Session establishment.
ApplicationDataIn
Wrapper for incoming [ApplicationData] with optional [IncomingPacketInfo].
ApplicationDataOut
Wrapper for outgoing [ApplicationData] with optional [IncomingPacketInfo].
AtomicSurbFlowEstimator
An implementation of SurbFlowEstimator that tracks the number of produced and consumed SURBs via two AtomicU64s.
BalancerStateValues
Runtime state of the SurbBalancer.
FlowControlConfig
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.
HoprSession
Represents the Session protocol socket over HOPR.
HoprSessionCapabilities
Wrapper for Capabilities that makes conversion to/from u8 possible.
HoprSessionConfig
Configures the Session protocol socket over HOPR.
IncomingSessionPixConfig
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 SessionManager to use PIX protocol.
SessionClientConfig
Configuration for the session.
SessionManager
Manages lifecycles of Sessions.
SessionManagerConfig
Configuration for the SessionManager.
SurbBalancerConfig
Configuration for the SurbBalancer.

Enums§

AcknowledgementMode
Indicates the acknowledgement mode of a stateful Session socket.
Capability
Individual capabilities of a Session.
DestinationRouting
Routing information containing forward or return routing options.
DispatchResult
Indicates the result of processing a message.
HoprSessionInPixEvent
Events received by the crate::manager::SessionManager in reaction to received shares from the packet pipeline.
HoprSessionOutPixEvent
Events raised by the crate::manager::SessionManager in response to received PIX messages.
InvalidPixParams
Why a PixParams quadruple was rejected.
IpOrHost
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.
SealedHost
Contains optionally encrypted IpOrHost.
SessionTarget
SessionId, ServiceId, and SessionTarget are provided by hopr-types and re-exported here via hopr-utils, so they match the published hopr-api session 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§

IpOrHostExt
Runtime-specific extensions for IpOrHost.

Functions§

transfer_session
Bidirectionally copies data between a HoprSession and an arbitrary async IO stream.

Type Aliases§

Capabilities
Set of Session capabilities.
HoprStartProtocol
Start protocol instantiation for HOPR.
IncomingSession
Wrapper for an incoming HoprSession carrying the SessionId and SessionTarget extracted from the Start protocol during session establishment.
ServiceId
SessionId, ServiceId, and SessionTarget are provided by hopr-types and re-exported here via hopr-utils, so they match the published hopr-api session types.
SessionId
SessionId, ServiceId, and SessionTarget are provided by hopr-types and re-exported here via hopr-utils, so they match the published hopr-api session types.