Trait wifi_rs::prelude::WifiHotspot
source · pub trait WifiHotspot: Debug + WifiInterface {
fn create_hotspot(
&mut self,
ssid: &str,
password: &str,
configuration: Option<&HotspotConfig>
) -> Result<bool, WifiHotspotError> { ... }
fn start_hotspot() -> Result<bool, WifiHotspotError> { ... }
fn stop_hotspot(&mut self) -> Result<bool, WifiHotspotError> { ... }
}
Expand description
Wireless hotspot functionality for a wifi interface.
Provided Methods§
sourcefn create_hotspot(
&mut self,
ssid: &str,
password: &str,
configuration: Option<&HotspotConfig>
) -> Result<bool, WifiHotspotError>
fn create_hotspot(
&mut self,
ssid: &str,
password: &str,
configuration: Option<&HotspotConfig>
) -> Result<bool, WifiHotspotError>
Creates wireless hotspot service for host machine. This only creates the wifi network,
and isn’t responsible for initiating the serving of the wifi network process.
To begin serving the hotspot, use start_hotspot()
.
sourcefn start_hotspot() -> Result<bool, WifiHotspotError>
fn start_hotspot() -> Result<bool, WifiHotspotError>
Start serving publicly an already created wireless hotspot.
sourcefn stop_hotspot(&mut self) -> Result<bool, WifiHotspotError>
fn stop_hotspot(&mut self) -> Result<bool, WifiHotspotError>
Stop serving a wireless network.
NOTE: All users connected will automatically be disconnected.
Implementors§
impl WifiHotspot for WiFi
Wireless hotspot functionality for a wifi interface.