vibe.d beta banner
get vibe.d
0.10.0

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.
EventDriverPipes
EventDriverProcesses
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
PipeFD
Process Describes a spawned process
ProcessID
SignalListenID
SocketFD
StreamListenSocketFD
StreamSocketFD
TimerID
WatcherID

Enums

NameDescription
CloseStatus
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
ProcessConfig See std.process.Config
ProcessRedirect
ProcessStderrRedirect
ProcessStdoutRedirect
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))
FileCloseCallback nothrow @safe void delegate(FileFD, CloseStatus)
FileIOCallback nothrow @safe void delegate(FileFD, IOStatus, ulong)
IOCallback nothrow @safe void delegate(StreamSocketFD, IOStatus, ulong)
PipeCloseCallback nothrow @safe void delegate(PipeFD, CloseStatus)
PipeIOCallback nothrow @safe void delegate(PipeFD, IOStatus, ulong)
ProcessStderrFile std.variant.VariantN!(4L,int,eventcore.driver.ProcessRedirect,eventcore.driver.ProcessStderrRedirect)
ProcessStdinFile std.variant.VariantN!(4L,int,eventcore.driver.ProcessRedirect)
ProcessStdoutFile std.variant.VariantN!(4L,int,eventcore.driver.ProcessRedirect,eventcore.driver.ProcessStdoutRedirect)
ProcessWaitCallback nothrow @safe void delegate(ProcessID, int)
SignalCallback nothrow @safe void delegate(SignalListenID, SignalStatus, int)
ThreadCallback nothrow @safe void function(long)
ThreadCallbackGen nothrow @safe void function(ref ubyte[64])
ThreadCallbackGenParams ubyte[64]
TimerCallback nothrow @safe void delegate(TimerID)
TimerCallback2 nothrow @safe void delegate(TimerID, bool)
Authors
Copyright
License