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 ๐Ÿ”’
errors
manager ๐Ÿ”’
telemetry ๐Ÿ”’
types ๐Ÿ”’
utils ๐Ÿ”’

Structsยง

AtomicSurbFlowEstimator
An implementation of SurbFlowEstimator that tracks the number of produced and consumed SURBs via two AtomicU64s.
BalancerStateValues
Runtime state of the SurbBalancer.
ByteCapabilities
Wrapper for Capabilities that makes conversion to/from u8 possible.
HoprSession
Represents the Session protocol socket over HOPR.
HoprSessionConfig
Configures the Session protocol socket over HOPR.
IncomingSession
Wrapper for incoming HoprSession along with other information extracted from the Start protocol during the session establishment.
SessionClientConfig
Configuration for the session.
SessionId
Unique ID of a specific Session in a certain direction.
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.
DispatchResult
Indicates the result of processing a message.
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.
SessionAckMode
SessionLifecycleState
SessionTarget
Defines what should happen with the data at the recipient where the data from the established session are supposed to be forwarded to some target.

Constantsยง

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.

Functionsยง

transfer_session
Convenience function to copy data in both directions between a Session and arbitrary async IO stream. This function is only available with Tokio and will panic with other runtimes.

Type Aliasesยง

Capabilities
Set of Session capabilities.
ServiceId
Describes a node service target. These are specialized SessionTargets that are local to the Exit node and have different purposes, such as Cover Traffic.