mirror of
https://github.com/asterinas/asterinas.git
synced 2025-06-25 18:33:24 +00:00
Notify socket events directly
This commit is contained in:
committed by
Tate, Hongliang Tian
parent
2f66f5d234
commit
d9f3a7761a
@ -295,7 +295,7 @@ impl<E: Ext> SocketTable<E> {
|
||||
"there should be no need to poll a dead TCP connection",
|
||||
);
|
||||
|
||||
connection.on_dead_events();
|
||||
connection.notify_dead_events();
|
||||
}
|
||||
|
||||
pub(crate) fn remove_udp_socket(
|
||||
@ -309,18 +309,6 @@ impl<E: Ext> SocketTable<E> {
|
||||
Some(self.udp_sockets.swap_remove(index))
|
||||
}
|
||||
|
||||
pub(crate) fn tcp_listener_iter(&self) -> impl Iterator<Item = &Arc<TcpListenerBg<E>>> {
|
||||
self.listener_buckets
|
||||
.iter()
|
||||
.flat_map(|bucket| bucket.listeners.iter())
|
||||
}
|
||||
|
||||
pub(crate) fn tcp_conn_iter(&self) -> impl Iterator<Item = &Arc<TcpConnectionBg<E>>> {
|
||||
self.connection_buckets
|
||||
.iter()
|
||||
.flat_map(|bucket| bucket.connections.iter())
|
||||
}
|
||||
|
||||
pub(crate) fn udp_socket_iter(&self) -> impl Iterator<Item = &Arc<UdpSocketBg<E>>> {
|
||||
self.udp_sockets.iter()
|
||||
}
|
||||
|
Reference in New Issue
Block a user