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.

More...

Members

Aliases

AcceptCallback
alias AcceptCallback = void delegate(StreamListenSocketFD, StreamSocketFD, scope RefAddress remote_address)
Undocumented in source.
ConnectCallback
alias ConnectCallback = void delegate(StreamSocketFD, ConnectStatus)
Undocumented in source.
DNSLookupCallback
alias DNSLookupCallback = void delegate(DNSLookupID, DNSStatus, scope RefAddress[])
Undocumented in source.
DataInitializer
alias DataInitializer = void function(void*) @(nogc)
Undocumented in source.
DatagramIOCallback
alias DatagramIOCallback = void delegate(DatagramSocketFD, IOStatus, size_t, scope RefAddress)
Undocumented in source.
EventCallback
alias EventCallback = void delegate(EventID)
Undocumented in source.
FileChangesCallback
alias FileChangesCallback = void delegate(WatcherID, ref const FileChange change)
Undocumented in source.
FileCloseCallback
alias FileCloseCallback = void delegate(FileFD, CloseStatus)
Undocumented in source.
FileIOCallback
alias FileIOCallback = void delegate(FileFD, IOStatus, size_t)
Undocumented in source.
IOCallback
alias IOCallback = void delegate(StreamSocketFD, IOStatus, size_t)
Undocumented in source.
PipeCloseCallback
alias PipeCloseCallback = void delegate(PipeFD, CloseStatus)
Undocumented in source.
PipeIOCallback
alias PipeIOCallback = void delegate(PipeFD, IOStatus, size_t)
Undocumented in source.
ProcessStderrFile
alias ProcessStderrFile = Algebraic!(int, ProcessRedirect, ProcessStderrRedirect)
Undocumented in source.
ProcessStdinFile
alias ProcessStdinFile = Algebraic!(int, ProcessRedirect)
Undocumented in source.
ProcessStdoutFile
alias ProcessStdoutFile = Algebraic!(int, ProcessRedirect, ProcessStdoutRedirect)
Undocumented in source.
ProcessWaitCallback
alias ProcessWaitCallback = void delegate(ProcessID, int)
Undocumented in source.
SignalCallback
alias SignalCallback = void delegate(SignalListenID, SignalStatus, int)
Undocumented in source.
ThreadCallback
deprecated alias ThreadCallback = void function(intptr_t param1) @(safe) nothrow
Undocumented in source.
ThreadCallbackGen
alias ThreadCallbackGen = void function(ref ThreadCallbackGenParams param3) @(safe) nothrow
Undocumented in source.
ThreadCallbackGenParams
alias ThreadCallbackGenParams = ubyte[8 * intptr_t.sizeof]
Undocumented in source.
TimerCallback
alias TimerCallback = void delegate(TimerID)
Undocumented in source.
TimerCallback2
alias TimerCallback2 = void delegate(TimerID, bool fired)
Undocumented in source.

Classes

RefAddress
class RefAddress
Undocumented in source.

Enums

CloseStatus
enum CloseStatus
Undocumented in source.
ConnectStatus
enum ConnectStatus
Undocumented in source.
ConnectionState
enum ConnectionState
Undocumented in source.
DNSStatus
enum DNSStatus
Undocumented in source.
DatagramCreateOptions
enum DatagramCreateOptions
Undocumented in source.
DatagramSocketOption
enum DatagramSocketOption
Undocumented in source.
ExitReason
enum ExitReason
Undocumented in source.
FileChangeKind
enum FileChangeKind

Specifies the kind of change in a watched directory.

FileOpenMode
enum FileOpenMode

Specifies how a file is manipulated on disk.

IOMode
enum IOMode
Undocumented in source.
IOStatus
enum IOStatus
Undocumented in source.
ProcessConfig
enum ProcessConfig

See std.process.Config

ProcessRedirect
enum ProcessRedirect
Undocumented in source.
ProcessStderrRedirect
enum ProcessStderrRedirect
Undocumented in source.
ProcessStdoutRedirect
enum ProcessStdoutRedirect
Undocumented in source.
SignalStatus
enum SignalStatus
Undocumented in source.
StreamListenOptions
enum StreamListenOptions
Undocumented in source.
StreamSocketOption
enum StreamSocketOption
Undocumented in source.
hasNoGCLifetime
eponymoustemplate hasNoGCLifetime(T)
Undocumented in source.

Interfaces

EventDriver
interface EventDriver

Encapsulates a full event driver.

EventDriverCore
interface EventDriverCore

Provides generic event loop control.

EventDriverDNS
interface EventDriverDNS

Performs asynchronous DNS queries.

EventDriverEvents
interface EventDriverEvents

Cross-thread notifications

EventDriverFiles
interface EventDriverFiles

Provides read/write operations on the local file system.

EventDriverPipes
interface EventDriverPipes
Undocumented in source.
EventDriverProcesses
interface EventDriverProcesses
Undocumented in source.
EventDriverSignals
interface EventDriverSignals

Handling of POSIX signals.

EventDriverSockets
interface EventDriverSockets

Provides access to socket functionality.

EventDriverTimers
interface EventDriverTimers
Undocumented in source.
EventDriverWatchers
interface EventDriverWatchers
Undocumented in source.

Mixin templates

Handle
mixintemplate Handle(string NAME, T, T invalid_value = T.init)
Undocumented in source.

Structs

DNSLookupID
struct DNSLookupID
Undocumented in source.
DatagramSocketFD
struct DatagramSocketFD
Undocumented in source.
EventID
struct EventID
Undocumented in source.
EventWaitID
struct EventWaitID
Undocumented in source.
FD
struct FD
Undocumented in source.
FileChange
struct FileChange

Describes a single change in a watched directory.

FileFD
struct FileFD
Undocumented in source.
PipeFD
struct PipeFD
Undocumented in source.
Process
struct Process

Describes a spawned process

ProcessID
struct ProcessID
Undocumented in source.
SignalListenID
struct SignalListenID
Undocumented in source.
SocketFD
struct SocketFD
Undocumented in source.
StreamListenSocketFD
struct StreamListenSocketFD
Undocumented in source.
StreamSocketFD
struct StreamSocketFD
Undocumented in source.
TimerID
struct TimerID
Undocumented in source.
WatcherID
struct WatcherID
Undocumented in source.

Detailed Description

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.

Meta