working basic flow

This commit is contained in:
Joseph Montanaro
2022-12-19 15:26:44 -08:00
parent 10fd1d6028
commit 3d5cbedae1
11 changed files with 700 additions and 89 deletions

View File

@ -53,9 +53,11 @@ async fn handle(mut stream: TcpStream, app_handle: AppHandle) -> Result<(), Requ
};
let clients = clientinfo::get_clients(peer_addr.port())?;
// Do we want to panic if this fails? Does that mean the frontend is dead?
let req = Request {id: request_id, clients};
app_handle.emit_all("credentials-request", req).unwrap();
app_handle.emit_all("credentials-request", req)?;
let window = app_handle.get_window("main").ok_or(RequestError::NoMainWindow)?;
window.show()?;
window.set_focus()?;
let mut buf = [0; 8192]; // it's what tokio's BufReader uses
let mut n = 0;