Rename FrontendEvent to FrontendRequest (#111)

* rename frontend event and notify
* simplify event names
This commit is contained in:
Ferdinand Schober
2024-04-25 22:18:43 +02:00
committed by GitHub
parent 9edd2f7f3b
commit 279e582698
7 changed files with 97 additions and 92 deletions

View File

@@ -10,7 +10,7 @@ use crate::{
client::{ClientHandle, ClientManager},
config::Config,
dns,
frontend::{FrontendEvent, FrontendListener},
frontend::{FrontendListener, FrontendRequest},
server::capture_task::CaptureEvent,
};
@@ -144,7 +144,7 @@ impl Server {
.collect::<Vec<_>>();
for (handle, hostname) in active {
frontend_tx
.send(FrontendEvent::ActivateClient(handle, true))
.send(FrontendRequest::Activate(handle, true))
.await?;
if let Some(hostname) = hostname {
let _ = resolve_tx.send(DnsRequest { hostname, handle }).await;
@@ -178,7 +178,7 @@ impl Server {
let _ = emulate_channel.send(EmulationEvent::Terminate).await;
let _ = capture_channel.send(CaptureEvent::Terminate).await;
let _ = frontend_tx.send(FrontendEvent::Shutdown()).await;
let _ = frontend_tx.send(FrontendRequest::Terminate()).await;
if !capture_task.is_finished() {
if let Err(e) = capture_task.await {