Skip to main content

Crate hopr_utils_session

Crate hopr_utils_session 

Source
Expand description

Session-related utilities for HOPR

This module provides utility functions and structures for managing sessions, including session lifecycle management, session data handling, and common session operations.

Structs§

ClientEntry
A single client connected to a session listener.
HopSessionFactory
ListenerId
ListenerJoinHandles
SessionPool
StoredSessionEntry
Entry stored in the session registry table.

Enums§

BindError
SessionTargetSpec
Session target specification.

Constants§

HOPR_TCP_BUFFER_SIZE
Size of the buffer for forwarding data to/from a TCP stream.
HOPR_UDP_BUFFER_SIZE
Size of the buffer for forwarding data to/from a UDP stream.
HOPR_UDP_QUEUE_SIZE
Size of the queue (back-pressure) for data incoming from a UDP stream.

Traits§

SessionFactory

Functions§

bind_session_to_stream 🔒
build_binding_host
This function first tries to parse requested as the ip:port host pair. If that does not work, it tries to parse requested as a single IP address and as a : prefixed port number. Whichever of those fails, is replaced by the corresponding part from the given default.
create_tcp_client_binding
create_udp_client_binding
tcp_listen_on 🔒
Listen on a specified address with a port from an optional port range for TCP connections.
try_restricted_bind 🔒
udp_bind_to

Type Aliases§

Routing
SessionPoolInner 🔒