Module connection_pool

Module connection_pool 

Source
Expand description

A simple iroh connection pool

Entry point is ConnectionPool. You create a connection pool for a specific ALPN and Options. Then the pool will manage connections for you.

Access to connections is via the ConnectionPool::get_or_connect method, which gives you access to a connection via a ConnectionRef if possible.

It is important that you keep the ConnectionRef alive while you are using the connection.

Structs§

ConnectionPool
A connection pool
ConnectionRef
A reference to a connection that is owned by a connection pool.
Options
Configuration options for the connection pool

Enums§

ConnectionPoolError
Error when calling a fn on the ConnectionPool.
PoolConnectError
Error when a connection can not be acquired

Type Aliases§

OnConnected