Skip to content

Commit 5a43125

Browse files
committed
print the direct addr too
1 parent 3882aba commit 5a43125

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

iroh/examples/transfer.rs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -313,8 +313,14 @@ impl EndpointArgs {
313313

314314
async fn provide(endpoint: Endpoint, size: u64) -> Result<()> {
315315
let endpoint_id = endpoint.id();
316+
let endpoint_addr = endpoint.addr();
316317

317-
println!("Endpoint id:\n{endpoint_id}\n");
318+
println!("Endpoint id:\n{endpoint_id}");
319+
println!("Direct addresses:");
320+
for addr in &endpoint_addr.direct_addresses {
321+
println!("\t{addr}");
322+
}
323+
println!();
318324

319325
// accept incoming connections, returns a normal QUIC connection
320326
while let Some(incoming) = endpoint.accept().await {

0 commit comments

Comments
 (0)