📶
Library to check your Internet connectivity
online
Twitter
if you like this project
It uses TCP to try to connect to Chrome and Firefox (fallback) captive portal detection servers.
Use
use std::time::Duration;
use online::*;
assert_eq!(online(None), Ok(true));
// with timeout
let timeout = Duration::new(6, 0);
assert_eq!(online(Some(timeout)), Ok(true));
Contributing