Split up EventDriver interface into individual sub interfaces.
This commit is contained in:
parent
021f918236
commit
e3c4af8433
4 changed files with 134 additions and 98 deletions
|
@ -36,7 +36,7 @@ private long currStdTime()
|
|||
return Clock.currStdTime;
|
||||
}
|
||||
|
||||
abstract class PosixEventDriver : EventDriver {
|
||||
abstract class PosixEventDriver : EventDriver, EventDriverCore, EventDriverFiles, EventDriverSockets, EventDriverTimers, EventDriverEvents, EventDriverWatchers {
|
||||
@safe: /*@nogc:*/ nothrow:
|
||||
|
||||
private {
|
||||
|
@ -54,6 +54,13 @@ abstract class PosixEventDriver : EventDriver {
|
|||
//startNotify!(EventType.read)(m_wakeupEvent, null); // should already be caught by registerFD
|
||||
}
|
||||
|
||||
@property PosixEventDriver core() { return this; }
|
||||
@property PosixEventDriver files() { return this; }
|
||||
@property PosixEventDriver sockets() { return this; }
|
||||
@property PosixEventDriver udp() { return this; }
|
||||
@property PosixEventDriver events() { return this; }
|
||||
@property PosixEventDriver watchers() { return this; }
|
||||
|
||||
mixin DefaultTimerImpl!();
|
||||
|
||||
protected int maxFD() const { return cast(int)m_fds.length; }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue