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ยง

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.

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