From 11ee6292ba61238343adba0bedb75098036e9c99 Mon Sep 17 00:00:00 2001 From: _ <> Date: Sun, 10 Oct 2021 17:56:13 +0000 Subject: [PATCH] :recycle: refactor: extract GuiClient struct --- prototypes/ptth_quic_client_gui/src/main.rs | 81 +++++++++++++++------ 1 file changed, 58 insertions(+), 23 deletions(-) diff --git a/prototypes/ptth_quic_client_gui/src/main.rs b/prototypes/ptth_quic_client_gui/src/main.rs index 544bd65..438184d 100644 --- a/prototypes/ptth_quic_client_gui/src/main.rs +++ b/prototypes/ptth_quic_client_gui/src/main.rs @@ -10,6 +10,7 @@ use fltk::{ window::Window }; use structopt::StructOpt; +use tokio::runtime::Runtime; use quic_demo::{ client_proxy::*, @@ -35,9 +36,50 @@ enum Message { ClosePort (usize), } +struct GuiClient <'a> { + rt: &'a Runtime, + frame_status: Frame, + forwarding_instances: Vec