Skip to content

Commit d966f38

Browse files
committed
docs
1 parent a45af54 commit d966f38

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

iroh/src/magicsock.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -272,7 +272,7 @@ impl MagicSock {
272272
/// The actor is responsible for holepunching and opening additional paths to this
273273
/// connection.
274274
///
275-
/// Returns a future that resolves to [`PathsWatchable`].
275+
/// Returns a future that resolves to [`PathsWatcher`].
276276
///
277277
/// The returned future is `'static`, so it can be stored without being liftetime-bound to `&self`.
278278
pub(crate) fn register_connection(

iroh/src/magicsock/endpoint_map/endpoint_state.rs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1133,14 +1133,18 @@ impl ConnectionState {
11331133
///
11341134
/// This is stored in the [`Connection`], and the watchables are set from within the endpoint state actor.
11351135
///
1136+
/// Internally, this contains a boxed-mapped-joined watcher over the open paths in the connection and the
1137+
/// selected path to the remote endpoint. The watcher is boxed because the mapped-joined watcher with
1138+
/// `SmallVec<PathInfoList>` has a size of over 800 bytes, which we don't want to put upon the [`Connection`].
1139+
///
11361140
/// [`Connection`]: crate::endpoint::Connection
11371141
#[derive(Clone, derive_more::Debug)]
11381142
#[debug("PathsWatcher")]
11391143
pub(crate) struct PathsWatcher(
11401144
Box<
11411145
n0_watcher::Map<
11421146
(
1143-
n0_watcher::Direct<SmallVec<[(TransportAddr, PathId); 4]>>,
1147+
n0_watcher::Direct<PathAddrList>,
11441148
n0_watcher::Direct<Option<transports::Addr>>,
11451149
),
11461150
PathInfoList,

0 commit comments

Comments
 (0)