ndt7_client/lib.rs
1//! An [ndt7](https://github.com/m-lab/ndt-server/blob/master/spec/ndt7-protocol.md) speed test
2//! client library.
3//!
4//! ndt7 is a network performance measurement protocol developed by
5//! [M-Lab](https://www.measurementlab.net/). It measures download and upload throughput
6//! over WebSocket connections and reports TCP-level metrics such as latency and retransmission.
7//!
8//! # Quick start
9//!
10//! ```no_run
11//! use ndt7_client::client::ClientBuilder;
12//!
13//! # #[tokio::main]
14//! # async fn main() -> Result<(), Box<dyn std::error::Error>> {
15//! let mut client = ClientBuilder::new("my-app", "0.1.0").build();
16//! let handle = client.start_download(None).await?;
17//! println!("connected to {}", handle.server_fqdn);
18//! let mut rx = handle.rx;
19//! while let Some(result) = rx.recv().await {
20//! match result {
21//! Ok(m) => println!("{:?}", m),
22//! Err(e) => eprintln!("error: {e}"),
23//! }
24//! }
25//! # Ok(())
26//! # }
27//! ```
28
29#![warn(missing_docs)]
30
31pub mod client;
32pub mod download;
33pub mod emitter;
34pub mod error;
35pub mod locate;
36pub mod params;
37pub mod spec;
38pub mod summary;
39pub mod upload;