vibe.d beta banner
get vibe.d
0.8.5

Asynchronous I/O that doesn’t get in your way, written in D

Module eventcore.driver

Definition of the core event driver interface.

This module contains all declarations necessary for defining and using event drivers. Event driver implementations will usually inherit from EventDriver using a final class to avoid virtual function overhead.

Callback Behavior

All callbacks follow the same rules to enable generic implementation of high-level libraries, such as vibe.d. Except for "listen" style callbacks, each callback will only ever be called at most once.

If the operation does not get canceled, the callback will be called exactly once. In case it gets manually canceled using the corresponding API function, the callback is guaranteed to not be called. However, the associated operation might still finish - either before the cancellation function returns, or afterwards.

Interfaces

NameDescription
EventDriver Encapsulates a full event driver.
EventDriverCore Provides generic event loop control.
EventDriverDNS Performs asynchronous DNS queries.
EventDriverEvents Cross-thread notifications
EventDriverFiles Provides read/write operations on the local file system.
EventDriverSignals Handling of POSIX signals.
EventDriverSockets Provides access to socket functionality.
EventDriverTimers
EventDriverWatchers

Classes

NameDescription
RefAddress

Structs

NameDescription
DatagramSocketFD
DNSLookupID
EventID
EventWaitID
FD
FileChange Describes a single change in a watched directory.
FileFD
SignalListenID
SocketFD
StreamListenSocketFD
StreamSocketFD
TimerID
WatcherID

Enums

NameDescription
ConnectionState
ConnectStatus
DatagramSocketOption
DNSStatus
ExitReason
FileChangeKind Specifies the kind of change in a watched directory.
FileOpenMode Specifies how a file is manipulated on disk.
IOMode
IOStatus
SignalStatus
StreamListenOptions
StreamSocketOption

Templates

NameDescription
Handle

Manifest constants

NameTypeDescription
hasNoGCLifetime

Aliases

NameTypeDescription
AcceptCallback nothrow @safe void delegate(StreamListenSocketFD, StreamSocketFD, RefAddress)
ConnectCallback nothrow @safe void delegate(StreamSocketFD, ConnectStatus)
DatagramIOCallback nothrow @safe void delegate(DatagramSocketFD, IOStatus, ulong, scope RefAddress)
DataInitializer nothrow @nogc void function(void*)
DNSLookupCallback nothrow @safe void delegate(DNSLookupID, DNSStatus, RefAddress[])
EventCallback nothrow @safe void delegate(EventID)
FileChangesCallback nothrow @safe void delegate(WatcherID, ref const(FileChange))
FileIOCallback nothrow @safe void delegate(FileFD, IOStatus, ulong)
IOCallback nothrow @safe void delegate(StreamSocketFD, IOStatus, ulong)
SignalCallback nothrow @safe void delegate(SignalListenID, SignalStatus, int)
ThreadCallback nothrow @safe void function(long)
TimerCallback nothrow @safe void delegate(TimerID)
TimerCallback2 nothrow @safe void delegate(TimerID, bool)
Authors
Copyright
License