Use Pollee as the socket observer

This commit is contained in:
Ruihan Li
2024-12-02 23:53:19 +08:00
committed by Tate, Hongliang Tian
parent fa76afb3a9
commit 1716f4f324
18 changed files with 242 additions and 188 deletions

View File

@ -1,6 +1,6 @@
// SPDX-License-Identifier: MPL-2.0
use crate::iface::ScheduleNextPoll;
use crate::{iface::ScheduleNextPoll, socket::SocketEventObserver};
/// Extension to be implemented by users of this crate.
///
@ -13,4 +13,10 @@ use crate::iface::ScheduleNextPoll;
pub trait Ext {
/// The type for ifaces to schedule the next poll.
type ScheduleNextPoll: ScheduleNextPoll;
/// The type for TCP sockets to observe events.
type TcpEventObserver: SocketEventObserver;
/// The type for UDP sockets to observe events.
type UdpEventObserver: SocketEventObserver;
}