Skip to content

Commit d4687e9

Browse files
committed
add presets
1 parent 6687c1c commit d4687e9

File tree

6 files changed

+7
-7
lines changed

6 files changed

+7
-7
lines changed

concepts/endpoints.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ use iroh::Endpoint;
6767

6868
// enables dialing by EndpointAddrs that only have EndpointIDs by default:
6969
let ep = Endpoint::builder()
70-
.bind()
70+
.bind(presets::N0)
7171
.await?;
7272
```
7373

examples/chat.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ async fn main() -> Result<()> {
6868
// for you each time.
6969
.secret_key(secret_key)
7070
// Bind the endpoint to the socket.
71-
.bind()
71+
.bind(presets::N0)
7272
.await?;
7373

7474
println!("> our endpoint id: {}", endpoint.id());
@@ -101,7 +101,7 @@ async fn main() -> Result<()> {
101101
// The `Endpoint` will generate a `SecretKey` for
102102
// you under the hood if you don't supply one.
103103
let endpoint = Endpoint::builder()
104-
.bind()
104+
.bind(presets::N0)
105105
.await?;
106106

107107
println!("> our endpoint id: {}", endpoint.id());

iroh-services/access.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ use iroh_services::Client;
4040

4141
#[tokio::main]
4242
async fn main() -> anyhow::Result<()> {
43-
let endpoint = Endpoint::builder().bind().await?;
43+
let endpoint = Endpoint::bind(presets::N0).await?;
4444
endpoint.online().await;
4545

4646
// Use your API key to authenticate

iroh-services/metrics/custom.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ use iroh_services::Client;
4141

4242
#[tokio::main]
4343
async fn main() -> anyhow::Result<()> {
44-
let endpoint = Endpoint::builder().bind().await?;
44+
let endpoint = Endpoint::bind(presets::N0).await?;
4545
endpoint.online().await;
4646

4747
let client = Client::new(&endpoint, "YOUR_API_KEY").await?;

iroh-services/quickstart.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ use iroh_services::Client;
5252
#[tokio::main]
5353
async fn main() -> anyhow::Result<()> {
5454
// Create an iroh endpoint
55-
let endpoint = Endpoint::builder().bind().await?;
55+
let endpoint = Endpoint::bind(presets::N0).await?;
5656

5757
// Wait for the endpoint to be online
5858
endpoint.online().await;

protocols/kv-crdts.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ use iroh_gossip::{net::Gossip, ALPN as GOSSIP_ALPN};
3838
async fn main() -> anyhow::Result<()> {
3939
// create an iroh endpoint that includes the standard discovery mechanisms
4040
// we've built at number0
41-
let endpoint = Endpoint::builder().bind().await?;
41+
let endpoint = Endpoint::bind(presets::N0).await?;
4242

4343
// build the gossip protocol
4444
let gossip = Gossip::builder().spawn(endpoint.clone());

0 commit comments

Comments
 (0)