EventLoop

Event handlers can be registered to the event loop by being run(), all events associated with them will trigger the OS to resume the underlying thread which enables the existence of all the asynchroneous event objects in this library.

Constructors

this
this()

Members

Functions

exit
void exit()

Call this to cleanup underlying OS resources. The implementation is currently incomplete and requires the process to be shut down for the resources to be collected automatically. Used as a placeholder in the meantime.

loop
bool loop(Duration max_timeout = 100.msecs)

Runs the event loop once and returns false if a an unrecoverable error occured Using a value of 0 will return immediately, while a value of -1.seconds will block indefinitely

resolveHost
NetworkAddress resolveHost(in string host, ushort port = 0, isIPv6 ipv6 = isIPv6.no, isTCP tcp = isTCP.yes, isForced force = isForced.yes)

Blocks until the hostname is resolved, unless it's invalid.

resolveIP
NetworkAddress resolveIP(in string ip, ushort port = 0, isIPv6 ipv6 = isIPv6.no, isTCP tcp = isTCP.yes, isForced force = isForced.yes)

Meta