chiark / gitweb /
break out Ipif::next_frame
[hippotat.git] / client / client.rs
index 8597cfd3ba2264ccff8b81dfafe149e7f5286e80..8e58c7c2a5f9dad9d6c943083b8aa2a69372ec42 100644 (file)
@@ -221,12 +221,10 @@ async fn run_client<C:HCC>(
           let _ = tx_queue.pop_front();
         },
 
-        data = ipif.tx.next_segment(),
+        data = Ipif::next_frame(&mut ipif.tx),
         if tx_queue.is_empty() =>
         {
-          let data = (||{
-            data?.ok_or_else(|| io::Error::from(io::ErrorKind::UnexpectedEof))
-          })().context("read from ipif")?;
+          let data = data?;
           //eprintln!("data={:?}", DumpHex(&data));
 
           match check1(Slip2Mime, ic.mtu, &data, |header| {