chore: udpate to smoltcp 0.12

This commit is contained in:
Aram 🍐 2024-12-01 15:22:37 -05:00
parent ca3590a4c0
commit 0e93a6435a
6 changed files with 13 additions and 11 deletions

View file

@ -6,6 +6,7 @@ use crate::Bus;
use anyhow::Context;
use async_trait::async_trait;
use bytes::Bytes;
use smoltcp::iface::PollResult;
use smoltcp::{
iface::{Config, Interface, SocketHandle, SocketSet},
socket::tcp,
@ -141,7 +142,7 @@ impl VirtualInterfacePoll for TcpVirtualInterface {
}
});
if iface.poll(loop_start, &mut device, &mut self.sockets) {
if iface.poll(loop_start, &mut device, &mut self.sockets) == PollResult::SocketStateChanged {
log::trace!("TCP virtual interface polled some packets to be processed");
}

View file

@ -6,6 +6,7 @@ use crate::{Bus, PortProtocol};
use anyhow::Context;
use async_trait::async_trait;
use bytes::Bytes;
use smoltcp::iface::PollResult;
use smoltcp::{
iface::{Config, Interface, SocketHandle, SocketSet},
socket::udp::{self, UdpMetadata},
@ -140,7 +141,7 @@ impl VirtualInterfacePoll for UdpVirtualInterface {
} => {
let loop_start = smoltcp::time::Instant::now();
if iface.poll(loop_start, &mut device, &mut self.sockets) {
if iface.poll(loop_start, &mut device, &mut self.sockets) == PollResult::SocketStateChanged {
log::trace!("UDP virtual interface polled some packets to be processed");
}