X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ian/git?a=blobdiff_plain;f=server%2Fslocal.rs;h=374849bc3d38ee9f222980f2472840ecc2cf4271;hb=c7764f8d4ea4b03b7f87888cc6ee199110efcc3c;hp=919c33882cb8a123bcb64d09aa091e8faeb9e86f;hpb=6e41ea57b29a20fe066785ab62147a1b7aed17ed;p=hippotat.git diff --git a/server/slocal.rs b/server/slocal.rs index 919c338..374849b 100644 --- a/server/slocal.rs +++ b/server/slocal.rs @@ -5,8 +5,21 @@ use super::*; #[allow(dead_code)] // xxx -#[throws(PacketError)] -pub async fn run(_global: &Global, - _rx: mpsc::Receiver) { - +#[allow(unused_variables)] // xxx +pub async fn run(global: Arc, + rx: mpsc::Receiver, + mut ipif: Ipif) -> Result { + let r = async { + loop { + select!{ + data = ipif.tx.next_segment() => + { + let data = data.context("read from ipif")?; + } + } + } + }.await; + + ipif.quitting(None).await; + r }