Skip to content

Commit

Permalink
docs(iroh-net): Document default relay servers a bit more (#2740)
Browse files Browse the repository at this point in the history
## Description

These were just some places where I was looking for this information
but did not find it easily.

## Breaking Changes

None

## Notes & open questions

It is docs Friday after all!

## Change checklist

- [x] Self-review.
- [x] Documentation updates following the [style
guide](https://rust-lang.github.io/rfcs/1574-more-api-documentation-conventions.html#appendix-a-full-conventions-text),
if relevant.
- ~~[ ] Tests if relevant.~~
- ~~[ ] All breaking changes documented.~~
  • Loading branch information
flub authored Sep 23, 2024
1 parent 2d863a9 commit 10025bd
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
3 changes: 2 additions & 1 deletion iroh-net/src/endpoint.rs
Original file line number Diff line number Diff line change
Expand Up @@ -193,14 +193,15 @@ impl Builder {
/// They also perform various functions related to hole punching, see the [crate docs]
/// for more details.
///
/// By default the Number0 relay servers are used.
/// By default the [number 0] relay servers are used, see [`RelayMode::Default`].
///
/// When using [RelayMode::Custom], the provided `relay_map` must contain at least one
/// configured relay node. If an invalid RelayMap is provided [`bind`]
/// will result in an error.
///
/// [`bind`]: Builder::bind
/// [crate docs]: crate
/// [number 0]: https://n0.computer
pub fn relay_mode(mut self, relay_mode: RelayMode) -> Self {
self.relay_mode = relay_mode;
self
Expand Down
4 changes: 4 additions & 0 deletions iroh-net/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,8 @@
//! nodes understand their own network situation. This includes offering a [STUN] server,
//! but also a few HTTP extra endpoints as well as responding to ICMP echo requests.
//!
//! By default the [number 0] relay servers are used, see [`RelayMode::Default`].
//!
//!
//! # Connections and Streams
//!
Expand Down Expand Up @@ -113,6 +115,8 @@
//! [`RelayUrl`]: crate::relay::RelayUrl
//! [`discovery`]: crate::endpoint::Builder::discovery
//! [`DnsDiscovery`]: crate::discovery::dns::DnsDiscovery
//! [number 0]: https://n0.computer
//! [`RelayMode::Default`]: crate::relay::RelayMode::Default

#![recursion_limit = "256"]
#![deny(missing_docs, rustdoc::broken_intra_doc_links)]
Expand Down

0 comments on commit 10025bd

Please sign in to comment.