mirror of
https://github.com/asterinas/asterinas.git
synced 2025-06-23 17:33:23 +00:00
Don't poll ifaces if not necessary
This commit is contained in:
committed by
Tate, Hongliang Tian
parent
fab61f5f66
commit
1c1da8ea06
@ -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()
|
||||
}
|
||||
|
Reference in New Issue
Block a user