pub fn new(
        server_addr: SocketAddrV4,
        nm: NetworkBackend,
        ui_path: PathBuf,
    ) -> (HttpServer, tokio::sync::oneshot::Sender<()>) {
        let (tx, exit_handler) = tokio::sync::oneshot::channel::<()>();
        let (connection_sender, connection_receiver) = tokio::sync::oneshot::channel::<Option<WifiConnectionRequest>>();

        (
            HttpServer {
                exit_handler,
                connection_receiver,
                server_addr: server_addr.clone(),
                state: Arc::new(Mutex::new(HttpServerState {
                    connection_sender: Some(connection_sender),
                    network_manager: nm,
                    connections: WifiConnections(Vec::new()),
                    server_addr,
                    sse: sse::new(),
                })),
                ui_path,
            },
            tx,
        )
    }
/// Create a new http server. The gateway address and a clone of the network manager is required.
/// If the ui is not compiled in, a valid ui_path must be given as well.
///
/// A tuple (http_server, exit handler) is returned. Call the exit handler for a graceful shutdown.
Create a new http server. The gateway address and a clone of the network manager is required.
If the ui is not compiled in, a valid ui_path must be given as well.

A tuple  is returned. Call the exit handler for a graceful shutdown.
Create a new http server . The gateway address and a clone of the network manager is required . If the ui is not compiled in a valid ui_path must be given as well . A tuple is returned . Call the exit handler for a graceful shutdown .
pub fn new(
        server_addr: SocketAddrV4,
        nm: NetworkBackend,
        ui_path: PathBuf,
    ) -> (HttpServer, tokio::sync::oneshot::Sender<()>) {
        let (tx, exit_handler) = tokio::sync::oneshot::channel::<()>();
        let (connection_sender, connection_receiver) = tokio::sync::oneshot::channel::<Option<WifiConnectionRequest>>();
        (
            HttpServer {
                exit_handler,
                connection_receiver,
                server_addr: server_addr.clone(),
                state: Arc::new(Mutex::new(HttpServerState {
                    connection_sender: Some(connection_sender),
                    network_manager: nm,
                    connections: WifiConnections(Vec::new()),
                    server_addr,
                    sse: sse::new(),
                })),
                ui_path,
            },
            tx,
        )
    }
pub fn new ( server_addr : SocketAddrV4 , nm : NetworkBackend , ui_path : PathBuf , ) -> ( HttpServer , tokio :: sync :: oneshot :: Sender < ( ) > ) { let ( tx , exit_handler ) = tokio :: sync :: oneshot :: channel :: < ( ) > ( ) ; let ( connection_sender , connection_receiver ) = tokio :: sync :: oneshot :: channel :: < Option < WifiConnectionRequest > > ( ) ; ( HttpServer { exit_handler , connection_receiver , server_addr : server_addr . clone ( ) , state : Arc :: new ( Mutex :: new ( HttpServerState { connection_sender : Some ( connection_sender ) , network_manager : nm , connections : WifiConnections ( Vec :: new ( ) ) , server_addr , sse : sse :: new ( ) , } ) ) , ui_path , } , tx , ) }
Create a new http server.
Create a new http server .
server_addr
SocketAddrV4
nm
NetworkBackend
ui_path
PathBuf
server_addr
SocketAddrV4
nm
NetworkBackend
ui_path
PathBuf