Skip to content

Commit

Permalink
docs: fix doc comment for magic_endpoint_conn_type_cb
Browse files Browse the repository at this point in the history
  • Loading branch information
ramfox committed Apr 29, 2024
1 parent 7b0fc6d commit e47f472
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions src/magic_endpoint.rs
Original file line number Diff line number Diff line change
Expand Up @@ -627,12 +627,9 @@ impl From<iroh_net::magicsock::ConnectionType> for ConnectionType {
}
}

/// Run a callback once you have a direct connection to a peer
/// Run a callback each time the [`ConnectionType`] to that peer has changed.
///
/// Does not block. The provided callback will be called when we have a direct
/// connection to the peer associated with the `node_id`, or the timeout has occurred.
///
/// To wait indefinitely, provide -1 for the timeout parameter.
/// Does not block. This will run until the connection has closed.
///
/// `ctx` is passed along to the callback, to allow passing context, it must be thread safe as the callback is
/// called from another thread.
Expand Down

0 comments on commit e47f472

Please sign in to comment.