mirror of
https://github.com/asterinas/asterinas.git
synced 2025-06-23 01:13:23 +00:00
Use Pollee
as the socket observer
This commit is contained in:
committed by
Tate, Hongliang Tian
parent
fa76afb3a9
commit
1716f4f324
@ -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;
|
||||
}
|
||||
|
Reference in New Issue
Block a user