chiark / gitweb /
3c1f5331c5a50acc244f518c26aabaf4b79f6de1
[hippotat.git] / server / slocal.rs
1 // Copyright 2021 Ian Jackson and contributors to Hippotat
2 // SPDX-License-Identifier: GPL-3.0-or-later
3 // There is NO WARRANTY.
4
5 use super::*;
6
7 #[allow(dead_code)] // xxx
8 #[allow(unused_variables)] // xxx
9 pub async fn run(global: Arc<Global>,
10                  rx: mpsc::Receiver<RoutedPacket>,
11                  mut ipif: Ipif) -> Result<Void,AE> {
12   let r = async {
13     loop {
14       select!{
15         biased;
16
17         // xxx something something rx something
18
19         data = ipif.tx.next_segment() =>
20         {
21           let data = data.context("read from ipif")?;
22         }
23       }
24     }
25   }.await;
26
27   ipif.quitting(None).await;
28   r
29 }