Don't poll ifaces if not necessary

This commit is contained in:
Ruihan Li
2024-11-16 23:09:20 +08:00
committed by Tate, Hongliang Tian
parent fab61f5f66
commit 1c1da8ea06
11 changed files with 217 additions and 87 deletions

View File

@ -3,7 +3,11 @@
use aster_bigtcp::{socket::ConnectState, wire::IpEndpoint};
use super::{connected::ConnectedStream, init::InitStream};
use crate::{events::IoEvents, net::iface::BoundTcpSocket, prelude::*};
use crate::{
events::IoEvents,
net::iface::{BoundTcpSocket, Iface},
prelude::*,
};
pub struct ConnectingStream {
bound_socket: BoundTcpSocket,
@ -72,6 +76,10 @@ impl ConnectingStream {
self.remote_endpoint
}
pub fn iface(&self) -> &Arc<Iface> {
self.bound_socket.iface()
}
pub(super) fn check_io_events(&self) -> IoEvents {
IoEvents::empty()
}