vibe.d beta banner
get vibe.d
0.8.3

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
FileChange Describes a single change in a watched directory.
Handle

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

Aliases

NameTypeDescription
AcceptCallback DFNbNfS9eventcore6driver__T6HandleVAyaa12_73747265616d4c697374656eTSQCjQCc__TQByVQBua6_736f636b6574TSQDqQDj__TQDfVQDba2_6664TmVmN1ZQEaVQBjS1N1ZQEmVQDcS1S1N1ZQFaSQFyQFr__TQFnVQFja12_73747265616d536f636b6574TQFjVQFnS1S1N1ZQHlMCQIkQId10RefAddressZv
ConnectCallback DFNbNfS9eventcore6driver__T6HandleVAyaa12_73747265616d536f636b6574TSQCjQCc__TQByVQBua6_736f636b6574TSQDqQDj__TQDfVQDba2_6664TmVmN1ZQEaVQBjS1N1ZQEmVQDcS1S1N1ZQFaEQFyQFr13ConnectStatusZv
DatagramIOCallback DFNbNfS9eventcore6driver__T6HandleVAyaa14_646174616772616d536f636b6574TSQCnQCg__TQCcVQBya6_736f636b6574TSQDuQDn__TQDjVQDfa2_6664TmVmN1ZQEeVQBjS1N1ZQEqVQDcS1S1N1ZQFeEQGcQFv8IOStatusmMCQGuQGn10RefAddressZv
DatagramSocketFD Handle!("datagramSocket",eventcore.driver.Handle!("socket",eventcore.driver.Handle!("fd",ulong,-1L).Handle,eventcore.driver.Handle!("fd",ulong,-1L).Handle(-1)).Handle,eventcore.driver.Handle!("socket",eventcore.driver.Handle!("fd",ulong,-1L).Handle,eventcore.driver.Handle!("fd",ulong,-1L).Handle(-1)).Handle((-1)))
DataInitializer nothrow void function(void*)
DNSLookupCallback nothrow @safe void delegate(Handle!("dns",ulong,-1L), DNSStatus, RefAddress[])
DNSLookupID Handle!("dns",ulong,-1L)
EventCallback DFNbNfS9eventcore6driver__T6HandleVAyaa5_6576656e74TSQBuQBn__TQBjVQBfa2_6664TmVmN1ZQCeVQBjS1N1ZQCqZv
EventID Handle!("event",eventcore.driver.Handle!("fd",ulong,-1L).Handle,eventcore.driver.Handle!("fd",ulong,-1L).Handle(-1))
EventWaitID Handle!("eventWait",ulong,-1L)
FD Handle!("fd",ulong,-1L)
FileChangesCallback nothrow @safe void delegate(Handle!("watcher",ulong,-1L), ref const(FileChange))
FileFD Handle!("file",eventcore.driver.Handle!("fd",ulong,-1L).Handle,eventcore.driver.Handle!("fd",ulong,-1L).Handle(-1))
FileIOCallback DFNbNfS9eventcore6driver__T6HandleVAyaa4_66696c65TSQBsQBl__TQBhVQBda2_6664TmVmN1ZQCcVQBjS1N1ZQCoEQDmQDf8IOStatusmZv
IOCallback DFNbNfS9eventcore6driver__T6HandleVAyaa12_73747265616d536f636b6574TSQCjQCc__TQByVQBua6_736f636b6574TSQDqQDj__TQDfVQDba2_6664TmVmN1ZQEaVQBjS1N1ZQEmVQDcS1S1N1ZQFaEQFyQFr8IOStatusmZv
SignalCallback nothrow @safe void delegate(Handle!("signal",ulong,-1L), SignalStatus, int)
SignalListenID Handle!("signal",ulong,-1L)
SocketFD Handle!("socket",eventcore.driver.Handle!("fd",ulong,-1L).Handle,eventcore.driver.Handle!("fd",ulong,-1L).Handle(-1))
StreamListenSocketFD Handle!("streamListen",eventcore.driver.Handle!("socket",eventcore.driver.Handle!("fd",ulong,-1L).Handle,eventcore.driver.Handle!("fd",ulong,-1L).Handle(-1)).Handle,eventcore.driver.Handle!("socket",eventcore.driver.Handle!("fd",ulong,-1L).Handle,eventcore.driver.Handle!("fd",ulong,-1L).Handle(-1)).Handle((-1)))
StreamSocketFD Handle!("streamSocket",eventcore.driver.Handle!("socket",eventcore.driver.Handle!("fd",ulong,-1L).Handle,eventcore.driver.Handle!("fd",ulong,-1L).Handle(-1)).Handle,eventcore.driver.Handle!("socket",eventcore.driver.Handle!("fd",ulong,-1L).Handle,eventcore.driver.Handle!("fd",ulong,-1L).Handle(-1)).Handle((-1)))
TimerCallback nothrow @safe void delegate(Handle!("timer",ulong,-1L))
TimerID Handle!("timer",ulong,-1L)
WatcherID Handle!("watcher",ulong,-1L)
Authors
Copyright
License