Notify socket events directly

This commit is contained in:
Ruihan Li
2025-03-18 20:55:17 +08:00
committed by Tate, Hongliang Tian
parent 2f66f5d234
commit d9f3a7761a
5 changed files with 12 additions and 65 deletions

View File

@ -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()
}